{"openapi":"3.1.0","info":{"title":"echowin API","version":"2.0.0","description":"API v2: the whole platform (D47). Errors are RFC 9457 problem details. Lists use cursor pagination (`limit`, `cursor` → `nextCursor`). Writes accept an `Idempotency-Key` header."},"servers":[{"url":"https://echo.win/api/v2"}],"components":{"securitySchemes":{"session":{"type":"apiKey","in":"cookie","name":"__Secure-echowin.session_token","description":"Portal session cookie set by /api/auth (httpOnly; same origin as the API)."},"apiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Tenant API key (`ew_…`), also accepted as `Authorization: Bearer`. Agency keys name a client with `X-Tenant-Id`."},"onboardingToken":{"type":"apiKey","in":"header","name":"X-Onboarding-Token","description":"Try before signup: the token returned by POST /onboarding/sessions, for that session only."}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string","example":"https://echo.win/problems/not_found"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"code":{"type":"string","enum":["bad_request","idempotency_key_required","validation_failed","unauthenticated","insufficient_credits","payment_required","forbidden","feature_not_enabled","reason_required","not_found","conflict","gone","precondition_failed","payload_too_large","idempotency_key_reused","idempotency_in_progress","captcha_failed","rate_limited","internal","unavailable"]},"requestId":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status","code"]},"User":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"image":{"type":["string","null"]}},"required":["id","name","email","image"]},"UpdateMe":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"image":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"An https image URL, or null to remove it"}},"additionalProperties":false},"NotificationPreferences":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"userId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"emailNotifications":{"type":"boolean"},"emailCategories":{"type":"object","properties":{"onboarding":{"type":"boolean"},"service_announcements":{"type":"boolean"},"missed_call":{"type":"boolean"},"call_transcript":{"type":"boolean"},"chat_transcript":{"type":"boolean"},"low_balance":{"type":"boolean"},"balance_depleted":{"type":"boolean"},"credits_added":{"type":"boolean"},"weekly_digest":{"type":"boolean"},"account_alerts":{"type":"boolean"},"transfer_message":{"type":"boolean"}},"required":["onboarding","service_announcements","missed_call","call_transcript","chat_transcript","low_balance","balance_depleted","credits_added","weekly_digest","account_alerts","transfer_message"]},"alwaysOn":{"type":"array","items":{"type":"string","enum":["payment_failed"]},"description":"D104: emails you get whatever these settings say. Owners always get payment_failed; others can opt out."},"transcriptEmails":{"type":"array","items":{"type":"string"}},"missedCallThresholdMinutes":{"type":["integer","null"]},"lowBalanceAlerts":{"type":"boolean"},"settings":{"type":"object","additionalProperties":{}}},"required":["tenantId","userId","emailNotifications","emailCategories","alwaysOn","transcriptEmails","missedCallThresholdMinutes","lowBalanceAlerts","settings"]},"NotificationPreferencesUpdate":{"type":"object","properties":{"emailNotifications":{"type":"boolean"},"emailCategories":{"type":"object","properties":{"onboarding":{"type":"boolean"},"service_announcements":{"type":"boolean"},"missed_call":{"type":"boolean"},"call_transcript":{"type":"boolean"},"chat_transcript":{"type":"boolean"},"low_balance":{"type":"boolean"},"balance_depleted":{"type":"boolean"},"credits_added":{"type":"boolean"},"weekly_digest":{"type":"boolean"},"account_alerts":{"type":"boolean"},"transfer_message":{"type":"boolean"}}},"transcriptEmails":{"type":"array","items":{"type":"string","maxLength":320,"format":"email"},"maxItems":20},"missedCallThresholdMinutes":{"type":["integer","null"],"minimum":0,"maximum":1440},"lowBalanceAlerts":{"type":"boolean"},"settings":{"type":"object","additionalProperties":{}}},"additionalProperties":false},"Me":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"]},"user":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"emailVerified":{"type":"boolean"},"image":{"type":["string","null"]},"twoFactorEnabled":{"type":"boolean"}},"required":["id","name","email","emailVerified","image","twoFactorEnabled"]},"apiKey":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","tenantId","scopes"]},"activeTenantId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"memberships":{"type":"array","items":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantName":{"type":"string"},"tenantKind":{"type":"string","enum":["platform","agency","client","direct"]},"role":{"type":"string","enum":["owner","admin","member","viewer","staff_admin","staff_support"]}},"required":["tenantId","tenantName","tenantKind","role"]}}},"required":["type","user","apiKey","activeTenantId","memberships"]},"Notification":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"userId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"level":{"type":"string"},"title":{"type":"string"},"body":{"type":["string","null"]},"link":{"type":["string","null"]},"readAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","userId","level","title","body","link","readAt","createdAt"]},"CustomDomain":{"type":"object","properties":{"hostname":{"type":["string","null"]},"status":{"type":"string"},"hostnameStatus":{"type":["string","null"]},"certificateStatus":{"type":["string","null"]},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["CNAME","TXT"]},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"]}},"kind":{"type":["string","null"],"enum":["free","custom",null]},"freeDomain":{"type":["object","null"],"properties":{"zone":{"type":"string"},"suggestion":{"type":["string","null"]}},"required":["zone","suggestion"]}},"required":["hostname","status","hostnameStatus","certificateStatus","records","kind","freeDomain"]},"CreateKnowledgeSource":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"refreshSchedule":{"type":"string","enum":["weekly","none"]},"kind":{"type":"string","enum":["qa"]},"question":{"type":"string","minLength":1,"maxLength":2000},"answer":{"type":"string","minLength":1,"maxLength":100000}},"required":["kind","question","answer"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"refreshSchedule":{"type":"string","enum":["weekly","none"]},"kind":{"type":"string","enum":["webpage"]},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"refreshSchedule":{"type":"string","enum":["weekly","none"]},"kind":{"type":"string","enum":["site_crawl"]},"url":{"type":"string","maxLength":2000,"format":"uri"},"crawl":{"type":"object","properties":{"maxPages":{"type":"integer","minimum":1,"maximum":25},"includePaths":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":100},"excludePaths":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":100}},"additionalProperties":false}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"refreshSchedule":{"type":"string","enum":["weekly","none"]},"kind":{"type":"string","enum":["document"]},"uploadId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["kind","uploadId"],"additionalProperties":false}]},"AgentConfig":{"type":"object","properties":{"timezone":{"type":"string","minLength":1,"maxLength":64,"example":"America/New_York"},"keyPhrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":200},"dtmfPassthrough":{"type":"boolean"},"languageLock":{"type":"boolean"},"transferFallback":{"type":"boolean"}},"additionalProperties":false},"DataJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed","canceled"]},"progress":{"type":"object","properties":{"done":{"type":"integer"},"total":{"type":["integer","null"]}},"required":["done","total"]},"result":{"type":["object","null"],"additionalProperties":{}},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","retryable"]},"rowErrors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"code":{"type":["string","null"]},"field":{"type":["string","null"]}},"required":["row","code","field"]}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"completedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"downloadUrl":{"type":["string","null"]}},"required":["id","kind","status","progress","result","error","rowErrors","createdAt","completedAt","expiresAt"]},"GateExemption":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"until":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"reason":{"type":"string"},"setBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","phoneNumberId","until","reason","setBy","createdAt","updatedAt"]},"ExtraNumbers":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneStatus":{"type":"string","enum":["paid","paused","unpaid"]},"includedNumbers":{"type":"integer"},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/TenantNumber"}},"extraNumberIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}}},"required":["tenantId","phoneStatus","includedNumbers","numbers","extraNumberIds"]},"TenantNumber":{"type":"object","properties":{"phoneNumberId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string"},"callsLast90Days":{"type":"integer"},"coveredBy":{"type":"string","enum":["number_subscription","included","extra"]},"held":{"type":"boolean"},"holdId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"exemptUntil":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["phoneNumberId","e164","callsLast90Days","coveredBy","held","holdId","exemptUntil"]},"NumberHold":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"reason":{"type":"string"},"setBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","phoneNumberId","reason","setBy","createdAt","updatedAt"]},"AgentDefinition":{"type":"object","properties":{"agent":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":2000},"instructions":{"type":"string","maxLength":100000},"language":{"type":"string","minLength":2,"maxLength":16},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"keyPhrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":200},"modelTier":{"type":"string","enum":["speedy","brainy"]},"speechEngine":{"type":"string","enum":["omega","beta"]},"voiceId":{"type":["string","null"],"maxLength":200},"omegaThinkingLevel":{"type":["string","null"],"minLength":1,"maxLength":32},"initialMessage":{"type":["string","null"],"maxLength":2000},"skipRecordingNotice":{"type":"boolean"},"autoDeleteTranscripts":{"type":"boolean"},"callTimeoutSeconds":{"type":["integer","null"],"minimum":30,"maximum":14400},"testPhoneNumber":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{6,14}$"},"config":{"$ref":"#/components/schemas/AgentConfig"},"voiceConfig":{"type":"object","additionalProperties":{}}},"additionalProperties":false},"knowledgeBases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000}},"required":["name","description"],"additionalProperties":false},"maxItems":100},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":["string","null"],"maxLength":20000},"config":{"type":"object","additionalProperties":{}},"channels":{"type":"array","items":{"type":"string","enum":["phone","chat","sms"]}},"enabled":{"type":"boolean"}},"required":["type","name","config"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["agent"],"additionalProperties":false},"NumberMove":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string"},"fromTenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"toTenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["awaiting_acceptance","executing","finalizing","completed","declined","expired","canceled","failed"]},"reason":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"acceptedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"carryoverUntil":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"failureCode":{"type":["string","null"]},"completedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","phoneNumberId","e164","fromTenantId","toTenantId","agentId","status","reason","expiresAt","acceptedAt","carryoverUntil","failureCode","completedAt","createdAt","updatedAt"]},"KnowledgeBase":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"description":{"type":["string","null"]},"embeddingModel":{"type":"string"},"embeddingDimensions":{"type":"number"},"publishedRevision":{"type":"number"},"sourceCount":{"type":"number"},"agentIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"}},"required":["id","name"]}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","description","embeddingModel","embeddingDimensions","publishedRevision","sourceCount","agentIds","createdAt","updatedAt"]},"KnowledgeSource":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"knowledgeBaseId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["qa","webpage","site_crawl","document"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":["string","null"]},"refreshSchedule":{"type":"string","enum":["weekly","none"]},"publishedVersionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"lastIngestedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"hasEditedSections":{"type":"boolean"},"editedSections":{"type":["array","null"],"items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["title","content"],"additionalProperties":false},"minItems":1,"maxItems":200},"question":{"type":"string"},"answer":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","knowledgeBaseId","kind","name","notes","url","status","error","refreshSchedule","publishedVersionId","lastIngestedAt","hasEditedSections","createdAt","updatedAt"]},"UpdateKnowledgeSource":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":["string","null"],"maxLength":10000},"refreshSchedule":{"type":"string","enum":["weekly","none"]},"question":{"type":"string","minLength":1,"maxLength":2000},"answer":{"type":"string","minLength":1,"maxLength":100000},"url":{"type":"string","maxLength":2000,"format":"uri"},"editedSections":{"type":["array","null"],"items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["title","content"],"additionalProperties":false},"minItems":1,"maxItems":200}},"additionalProperties":false},"KnowledgeChunk":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"sourceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"versionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["passage","qa"]},"position":{"type":"number"},"question":{"type":["string","null"]},"content":{"type":"string"},"tokens":{"type":["number","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["id","sourceId","versionId","kind","position","question","content","tokens","metadata"]},"KnowledgeSourceVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"sourceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"error":{"type":["string","null"]},"stats":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"publishedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","sourceId","status","error","stats","createdAt","publishedAt"]},"Agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"description":{"type":["string","null"]},"instructions":{"type":"string"},"language":{"type":"string"},"timezone":{"type":["string","null"]},"keyPhrases":{"type":"array","items":{"type":"string"}},"modelTier":{"type":"string","enum":["speedy","brainy"]},"speechEngine":{"type":"string","enum":["omega","beta"]},"voiceId":{"type":["string","null"]},"omegaThinkingLevel":{"type":["string","null"]},"initialMessage":{"type":["string","null"]},"skipRecordingNotice":{"type":"boolean"},"autoDeleteTranscripts":{"type":"boolean"},"callTimeoutSeconds":{"type":["integer","null"]},"testPhoneNumber":{"type":["string","null"]},"config":{"type":"object","additionalProperties":{}},"voiceConfig":{"type":"object","additionalProperties":{}},"templateId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"knowledgeBaseIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"phoneNumberIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"widgetIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"setup":{"type":["object","null"],"properties":{"status":{"type":"string"},"step":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["status","step","error"],"description":"Website-to-agent build progress; null when the agent was not generated"},"status":{"$ref":"#/components/schemas/AgentStatus"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","description","instructions","language","timezone","keyPhrases","modelTier","speechEngine","voiceId","omegaThinkingLevel","initialMessage","skipRecordingNotice","autoDeleteTranscripts","callTimeoutSeconds","testPhoneNumber","config","voiceConfig","templateId","knowledgeBaseIds","phoneNumberIds","widgetIds","setup","status","createdAt","updatedAt"]},"AgentStatus":{"type":"string","enum":["live","not_connected","building","needs_attention"],"description":"Derived; see agentStatus in apps/api/src/lib/agents.ts"},"Tenant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["platform","agency","client","direct"]},"parentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"status":{"type":"string","enum":["active","pending_approval","suspended","banned","deleted"]},"timezone":{"type":"string"},"locale":{"type":"string"},"settings":{"$ref":"#/components/schemas/TenantSettings"},"deletion":{"type":["object","null"],"properties":{"requestedAt":{"type":"string","format":"date-time"},"purgeAfter":{"type":"string","format":"date-time"}},"required":["requestedAt","purgeAfter"],"description":"Set while the team is scheduled for deletion (W308): it can be undone until purgeAfter with tenants.restore"},"phoneService":{"$ref":"#/components/schemas/PhoneService"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","kind","parentId","name","status","timezone","locale","settings","deletion","createdAt","updatedAt"]},"TenantSettings":{"type":"object","properties":{"address":{"type":["object","null"],"properties":{"street":{"type":["string","null"],"maxLength":200},"street2":{"type":["string","null"],"maxLength":200},"city":{"type":["string","null"],"maxLength":120},"state":{"type":["string","null"],"maxLength":120},"zipcode":{"type":["string","null"],"maxLength":32},"country":{"type":["string","null"],"maxLength":120}},"additionalProperties":false},"lowBalanceThresholdCredits":{"type":"integer","description":"Low-balance emails go out below this many credits (W171); the default is 1,000"}},"required":["lowBalanceThresholdCredits"]},"PhoneService":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","enum":["available","staff_denied","unavailable"]}},"required":["available","reason"],"description":"D106: phone numbers, calls and texting availability; returned by tenants.get"},"CreateTenant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":64},"industry":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false},"ReachableTenant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["platform","agency","client","direct"]},"parentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer","staff_admin","staff_support"]},"via":{"type":"string","enum":["member","agency","api_key"],"description":"How the caller reaches the tenant: own membership, through an agency, or as an API key"}},"required":["id","kind","parentId","name","role","via"]},"UpdateTenant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":64},"settings":{"type":"object","properties":{"address":{"type":["object","null"],"properties":{"street":{"type":["string","null"],"maxLength":200},"street2":{"type":["string","null"],"maxLength":200},"city":{"type":["string","null"],"maxLength":120},"state":{"type":["string","null"],"maxLength":120},"zipcode":{"type":["string","null"],"maxLength":32},"country":{"type":["string","null"],"maxLength":120}},"additionalProperties":false},"lowBalanceThresholdCredits":{"type":["integer","null"],"minimum":1,"maximum":8000000,"description":"Credits below which low-balance emails go out; null restores the default (1,000)"}},"additionalProperties":false}},"additionalProperties":false},"TenantDeletion":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["scheduled","restored"]},"requestedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"purgeAfter":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z","description":"Until then the deletion can be undone (POST /tenants/{tenantId}/restore); after it, numbers are released and data erased"},"creditsForfeitedMc":{"type":["integer","null"],"description":"Credits on the team's own billing account that are forfeited when the deletion completes"},"numbersHeld":{"type":"integer"},"subscriptionsCanceling":{"type":"integer","description":"Subscriptions set to end at the close of their period (no refunds); resumed on undo"}},"required":["tenantId","status","requestedAt","purgeAfter","creditsForfeitedMc","numbersHeld","subscriptionsCanceling"]},"ConfirmDeletion":{"type":"object","properties":{"confirmName":{"type":"string","minLength":1,"maxLength":200,"description":"The team's exact name, to confirm"}},"required":["confirmName"],"additionalProperties":false},"ActiveTenant":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["tenantId"],"additionalProperties":false},"SessionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionInfo"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]},"SessionInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"current":{"type":"boolean","description":"The session making this request"},"userAgent":{"type":["string","null"]},"ipAddress":{"type":["string","null"]},"impersonated":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","current","userAgent","ipAddress","impersonated","createdAt","updatedAt","expiresAt"]},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"userId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"role":{"type":"string","enum":["owner","admin","member","viewer","staff_admin","staff_support"]},"restrictedToAssignedClients":{"type":"boolean"},"emailNotifications":{"type":"boolean"},"clientTenantIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"description":"Agency members: the clients they are assigned to"},"user":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]}},"required":["name","email","image"]},"lastActiveAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","userId","role","restrictedToAssignedClients","emailNotifications","clientTenantIds","user","lastActiveAt","createdAt"]},"UpdateMember":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member","viewer"]},"restrictedToAssignedClients":{"type":"boolean"},"clientTenantIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"emailNotifications":{"type":"boolean"}},"additionalProperties":false},"Invitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantName":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"clientTenantIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"acceptedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","tenantName","email","role","status","invitedBy","clientTenantIds","expiresAt","acceptedAt","createdAt"]},"CreateInvitation":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"clientTenantIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000}},"required":["email","role"],"additionalProperties":false},"InvitationPreview":{"type":"object","properties":{"tenantName":{"type":"string"},"tenantKind":{"type":"string","enum":["platform","agency","client","direct"]},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"invitedByName":{"type":["string","null"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["tenantName","tenantKind","email","role","invitedByName","status","expiresAt"]},"AcceptInvitation":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":128},"invitationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e","description":"Instead of the token: an invitation addressed to the signed-in user's email"}},"additionalProperties":false},"AgencyProfile":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"label":{"type":"string","enum":["grey","white"]},"displayName":{"type":"string"},"logoUrl":{"type":["string","null"]},"theme":{"type":["object","null"],"additionalProperties":{}},"senderName":{"type":["string","null"]},"supportEmail":{"type":["string","null"]},"customDomain":{"type":["string","null"]},"customDomainStatus":{"type":["string","null"]},"defaultClientAccess":{"type":"object","properties":{"users":{"type":"boolean"},"instructions":{"type":"boolean"},"instructionsWrite":{"type":"boolean"},"testing":{"type":"boolean"},"knowledgeBase":{"type":"boolean"},"agentConfiguration":{"type":"boolean"},"agentCreation":{"type":"boolean"}},"additionalProperties":false},"waitlistEnabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["tenantId","label","displayName","logoUrl","theme","senderName","supportEmail","customDomain","customDomainStatus","defaultClientAccess","waitlistEnabled","createdAt","updatedAt"]},"AgentSetup":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["running","ready","failed"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"attempts":{"type":"number"},"maxAttempts":{"type":"number"},"canRetry":{"type":"boolean"},"retryAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["agentId","status","step","error","updatedAt","attempts","maxAttempts","canRetry","retryAt"]},"TestRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["completed","failed"]},"results":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"passed":{"type":"boolean"},"actual":{"type":"string"},"reason":{"type":"string"}},"required":["testCaseId","passed","actual","reason"]}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","agentId","status","results","createdAt","updatedAt"]},"AgentPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentListItem"}},"nextCursor":{"type":["string","null"]},"counts":{"$ref":"#/components/schemas/AgentCounts"}},"required":["data","nextCursor","counts"]},"AgentListItem":{"allOf":[{"$ref":"#/components/schemas/Agent"},{"type":"object","properties":{"activity":{"$ref":"#/components/schemas/AgentActivity"}},"required":["activity"]}]},"AgentActivity":{"type":"object","properties":{"lastConversationAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z","description":"Latest real (non-test) conversation"},"conversationsToday":{"type":"integer","description":"Real conversations since midnight in the tenant's timezone (UTC without one)"},"lastTest":{"type":["object","null"],"properties":{"at":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"status":{"type":"string","enum":["queued","ringing","active","ended","failed","no_answer","busy","canceled"]},"channel":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]}},"required":["at","status","channel"],"description":"Latest test conversation"}},"required":["lastConversationAt","conversationsToday","lastTest"]},"AgentCounts":{"type":"object","properties":{"all":{"type":"integer"},"live":{"type":"integer"},"not_connected":{"type":"integer"},"building":{"type":"integer"},"needs_attention":{"type":"integer"}},"required":["all","live","not_connected","building","needs_attention"],"description":"Agents per status across the whole tenant, ignoring this request's filters and page"},"CreateAgent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"templateId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e","description":"Start from a gallery, team or agency client template"},"description":{"type":["string","null"],"maxLength":2000},"instructions":{"type":"string","maxLength":100000},"language":{"type":"string","minLength":2,"maxLength":16},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"speechEngine":{"type":"string","enum":["omega","beta"]},"voiceId":{"type":["string","null"],"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateAgent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"instructions":{"type":"string","maxLength":100000},"language":{"type":"string","minLength":2,"maxLength":16},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"keyPhrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":200},"modelTier":{"type":"string","enum":["speedy","brainy"]},"speechEngine":{"type":"string","enum":["omega","beta"]},"voiceId":{"type":["string","null"],"maxLength":200},"omegaThinkingLevel":{"type":["string","null"],"minLength":1,"maxLength":32},"initialMessage":{"type":["string","null"],"maxLength":2000},"skipRecordingNotice":{"type":"boolean"},"autoDeleteTranscripts":{"type":"boolean"},"callTimeoutSeconds":{"type":["integer","null"],"minimum":30,"maximum":14400},"testPhoneNumber":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{6,14}$"},"config":{"$ref":"#/components/schemas/AgentConfig"},"voiceConfig":{"type":"object","additionalProperties":{}}},"additionalProperties":false},"CopyAgent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"AgentInstructions":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"instructions":{"type":"string"},"versionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"source":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["agentId","instructions","versionId","source","updatedAt"]},"SetInstructions":{"type":"object","properties":{"instructions":{"type":"string","minLength":1,"maxLength":100000}},"required":["instructions"],"additionalProperties":false},"InstructionVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"instructions":{"type":"string"},"source":{"type":"string"},"createdBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","agentId","instructions","source","createdBy","createdAt"]},"HealthCheck":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"result":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":100},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"message":{"type":"string"}},"required":["id","severity","message"]}},"fixes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string"},"changes":{"type":"object","properties":{"instructions":{"type":"string","maxLength":100000},"initialMessage":{"type":["string","null"],"maxLength":2000},"description":{"type":["string","null"],"maxLength":2000},"keyPhrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":200},"callTimeoutSeconds":{"type":["integer","null"],"minimum":30,"maximum":14400}},"additionalProperties":false}},"required":["id","description","changes"]}}},"required":["score","findings","fixes"]},"sourceUpdatedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","agentId","result","sourceUpdatedAt","createdAt"]},"ApplyFixes":{"type":"object","properties":{"fixIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":50}},"required":["fixIds"],"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"e164":{"type":["string","null"]},"email":{"type":["string","null"]},"company":{"type":["string","null"]},"customFields":{"type":"object","additionalProperties":{}},"address":{"type":["object","null"],"additionalProperties":{}},"doNotCall":{"type":"boolean"},"favorite":{"type":"boolean"},"ownerUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"source":{"type":["string","null"]},"autoPopulated":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"tags":{"type":"array","items":{"type":"object","additionalProperties":{}}},"listIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"assignments":{"type":"array","items":{"type":"object","additionalProperties":{}}},"notes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"memory":{"type":["string","null"]},"activity":{"type":"object","properties":{"conversations":{"type":"integer"},"lastConversationAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"lastChannel":{"type":["string","null"]}},"required":["conversations","lastConversationAt","lastChannel"]}},"required":["id","tenantId","firstName","lastName","e164","email","company","customFields","address","doNotCall","favorite","ownerUserId","source","autoPopulated","createdAt","updatedAt"]},"ContactNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"contactId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"body":{"type":"string"},"authorUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","contactId","body","authorUserId","createdAt","updatedAt"]},"ContactFieldDefinition":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","number","date","boolean","select","multiselect","email","phone","url"]},"required":{"type":"boolean"},"sensitive":{"type":"boolean"},"options":{"type":["array","null"],"items":{"type":"string"}},"validation":{"type":["object","null"],"additionalProperties":{}},"placeholder":{"type":["string","null"]},"helpText":{"type":["string","null"]},"position":{"type":"number"},"active":{"type":"boolean"},"hiddenByDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","label","type","required","sensitive","options","validation","placeholder","helpText","position","active","hiddenByDefault","createdAt","updatedAt"]},"ContactTag":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"color":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"contactCount":{"type":"integer"}},"required":["id","tenantId","name","color","createdAt"]},"ContactList":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"description":{"type":["string","null"]},"filters":{"type":["object","null"],"properties":{"version":{"type":"number","enum":[1]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ContactFilterCondition"}}},"required":["version","conditions"]},"dynamic":{"type":"boolean"},"unsupportedConditions":{"type":"integer"},"createdBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"contactCount":{"type":"integer"}},"required":["id","tenantId","name","description","filters","dynamic","unsupportedConditions","createdBy","createdAt","updatedAt"]},"ContactFilterCondition":{"type":"object","properties":{"id":{"type":"string","maxLength":100},"field":{"type":"string","minLength":1,"maxLength":120},"operator":{"type":"string","minLength":1,"maxLength":40},"value":{}},"required":["field","operator"],"additionalProperties":false},"ContactListFilters":{"type":["object","null"],"properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ContactFilterCondition"},"maxItems":50}},"required":["conditions"],"additionalProperties":false},"ContactButton":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","enum":["link","http","toggle"]},"config":{"type":"object","additionalProperties":{}},"icon":{"type":["string","null"]},"color":{"type":["string","null"]},"position":{"type":"integer"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","description","type","config","icon","color","position","active","createdAt","updatedAt"]},"Conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"channel":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["queued","ringing","active","ended","failed","no_answer","busy","canceled"]},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"contactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"fromAddress":{"type":["string","null"]},"toAddress":{"type":["string","null"]},"widgetId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"campaignId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"campaignContactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"scheduledCallId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"startedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"answeredAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"endedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"durationMs":{"type":["number","null"]},"billedSeconds":{"type":["number","null"]},"summary":{"type":["string","null"]},"score":{"type":["number","null"]},"flagged":{"type":"boolean"},"favorite":{"type":"boolean"},"spam":{"type":"boolean"},"isTest":{"type":"boolean"},"masked":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}},"archived":{"type":"boolean"},"contentDeleted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"agent":{"type":["object","null"],"additionalProperties":{}},"contact":{"type":["object","null"],"additionalProperties":{}},"callDetails":{"type":["object","null"],"additionalProperties":{}},"messages":{"type":"array","items":{"type":"object","additionalProperties":{}}},"memory":{"type":["string","null"]},"feedback":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"rating":{"type":"string","enum":["like","dislike"]},"comment":{"type":["string","null"]},"authorName":{"type":["string","null"]},"mine":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","rating","comment","authorName","mine","createdAt"]}},"own":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"rating":{"type":"string","enum":["like","dislike"]},"comment":{"type":["string","null"]},"authorName":{"type":["string","null"]},"mine":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","rating","comment","authorName","mine","createdAt"]}},"required":["reports","own"]},"title":{"type":["string","null"]}},"required":["id","tenantId","channel","direction","status","agentId","contactId","fromAddress","toAddress","widgetId","campaignId","campaignContactId","scheduledCallId","startedAt","answeredAt","endedAt","durationMs","billedSeconds","summary","score","flagged","favorite","spam","isTest","masked","metadata","archived","contentDeleted","createdAt","updatedAt","title"]},"Message":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"seq":{"type":"integer"},"role":{"type":"string","enum":["caller","agent","system","tool","transferee","note"]},"type":{"type":"string"},"content":{"type":["string","null"]},"toolName":{"type":["string","null"]},"toolData":{"type":["object","null"],"additionalProperties":{}},"interrupted":{"type":"boolean"},"latencyMs":{"type":["number","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","seq","role","type","content","toolName","toolData","interrupted","latencyMs","createdAt"]},"ConversationNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"conversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"body":{"type":"string"},"authorUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","conversationId","body","authorUserId","createdAt","updatedAt"]},"RecordingUrl":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"redacted":{"type":"boolean"},"durationMs":{"type":["number","null"]}},"required":["url","expiresAt","redacted","durationMs"]},"RevealedTranscript":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"seq":{"type":"integer"},"role":{"type":"string"},"content":{"type":["string","null"]},"values":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"category":{"type":"string"},"value":{"type":"string"}},"required":["token","category","value"]}}},"required":["id","seq","role","content","values"]}}},"required":["messages"]},"TestLine":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"string"},"description":"The shared test line(s). Call one from an agent's test phone number to talk to that agent. Empty when none is configured."},"agents":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"testPhoneNumber":{"type":"string"}},"required":["agentId","name","testPhoneNumber"]},"description":"Agents of the team with a registered test phone number (the caller the test line matches)"}},"required":["numbers","agents"]},"TestCallInput":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"A test phone number registered on one of the team's agents (agents.testPhoneNumber)"}},"required":["to"],"additionalProperties":false},"PhoneNumber":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"carrier":{"type":"string","enum":["telnyx","twilio","jambonz"]},"source":{"type":"string","enum":["purchased","ported","byoc","forwarded"]},"status":{"type":"string","enum":["reserved","pending","active","porting","released","failed"]},"trunkId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"recordCalls":{"type":"boolean"},"smsEnabled":{"type":"boolean"},"friendlyName":{"type":["string","null"]},"subscriptionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"releasedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"carrierNumberId":{"type":["string","null"]},"carrierConnectionId":{"type":["string","null"]},"agent":{"type":["object","null"],"additionalProperties":{}},"subscription":{"type":["object","null"],"additionalProperties":{}},"lastConversationAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z","description":"List only: latest real (non-test) conversation on this number"},"conversationsToday":{"type":"integer","minimum":0,"description":"List only: real conversations since midnight in the tenant's timezone (UTC without one)"}},"required":["id","tenantId","agentId","e164","carrier","source","status","trunkId","recordCalls","smsEnabled","friendlyName","subscriptionId","releasedAt","createdAt","updatedAt"]},"BlockedNumber":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"reason":{"type":["string","null"]},"autoDetected":{"type":"boolean"},"createdBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"hits":{"type":"integer"}},"required":["tenantId","e164","reason","autoDetected","createdBy","createdAt","hits"]},"SmsConsent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberE164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"contactE164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"optedOut":{"type":"boolean"},"keyword":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","phoneNumberE164","contactE164","optedOut","keyword","createdAt"]},"NumberReservation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"carrier":{"type":"string","enum":["telnyx","twilio","jambonz"]},"status":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"onboardingSessionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["id","e164","carrier","status","expiresAt","onboardingSessionId"]},"PortRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"numbers":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"carrier":{"type":"string","enum":["telnyx","twilio","jambonz"]},"status":{"type":"string"},"focDate":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"details":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"carrierOrderId":{"type":["string","null"]}},"required":["id","tenantId","numbers","carrier","status","focDate","details","createdAt","updatedAt"]},"TenDlcRegistration":{"type":"object","properties":{"brandStatus":{"type":["string","null"]},"campaignStatus":{"type":["string","null"]},"details":{"type":"object","additionalProperties":{}},"lastError":{"type":["string","null"]},"brandId":{"type":["string","null"]},"campaignId":{"type":["string","null"]}},"required":["brandStatus","campaignStatus","details","lastError"]},"Trunk":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"carrier":{"type":"string","enum":["telnyx","twilio","jambonz"]},"status":{"type":"string","enum":["pending","active","disabled","failed"]},"inbound":{"type":"boolean"},"outbound":{"type":"boolean"},"sipAddress":{"type":["string","null"]},"authenticationMode":{"type":"string","enum":["credentials","ip_token"]},"allowedIps":{"type":"array","items":{"type":"string"}},"routing":{"type":"object","additionalProperties":{}},"health":{"type":"object","properties":{"lastOptionsAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"lastCallAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"options":{"type":"object","properties":{"scope":{"type":"string","enum":["carrier_sip_proxy"]},"status":{"type":"string","enum":["unknown","pending","ok","challenge","rejected","error","unreachable"]},"code":{"type":["integer","null"]},"latencyMs":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["scope","status","code","latencyMs","error"]}},"required":["lastOptionsAt","lastCallAt","options"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","carrier","status","inbound","outbound","sipAddress","authenticationMode","allowedIps","routing","health","createdAt","updatedAt"]},"TrunkCallerIdRegistration":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"trunkId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"status":{"type":"string","enum":["awaiting_evidence","pending_review","active","rejected","revoked"]},"verificationMethod":{"type":["string","null"]},"submittedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"reviewedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"rejectionReason":{"type":["string","null"]},"reviewNote":{"type":["string","null"]},"activatedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"revokedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"revocationReason":{"type":["string","null"]},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["carrier_bill","carrier_loa","other"]},"fileName":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"retainUntil":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"purged":{"type":"boolean"}},"required":["id","kind","fileName","contentType","sizeBytes","createdAt","retainUntil","purged"]}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"activation":{"type":"object","properties":{"enabled":{"type":"boolean"},"reason":{"type":["string","null"]}},"required":["enabled","reason"]}},"required":["id","trunkId","e164","status","verificationMethod","submittedAt","reviewedAt","rejectionReason","reviewNote","activatedAt","phoneNumberId","revokedAt","revocationReason","evidence","createdAt","updatedAt","activation"]},"StaffCallerIdRegistration":{"allOf":[{"$ref":"#/components/schemas/TrunkCallerIdRegistration"},{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"attestedName":{"type":["string","null"]},"attestedTitle":{"type":["string","null"]}},"required":["tenantId","attestedName","attestedTitle"]}]},"AvailableNumber":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"type":{"type":"string","enum":["local","toll_free"]},"locality":{"type":["string","null"]},"region":{"type":["string","null"]},"features":{"type":"array","items":{"type":"string"}},"price":{"type":["object","null"],"properties":{"included":{"type":"boolean"},"monthlyCents":{"type":["integer","null"]},"currency":{"type":"string"}},"required":["included","monthlyCents","currency"]}},"required":["e164","type","locality","region","features","price"]},"NumberSuggestion":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"type":{"type":"string","enum":["local","toll_free"]},"locality":{"type":["string","null"]},"region":{"type":["string","null"]},"kind":{"type":"string","enum":["word","memorable","local","toll_free"]},"word":{"type":["string","null"]},"display":{"type":"string"},"price":{"type":["object","null"],"properties":{"included":{"type":"boolean"},"monthlyCents":{"type":["integer","null"]},"currency":{"type":"string"}},"required":["included","monthlyCents","currency"]}},"required":["e164","type","locality","region","kind","word","display","price"]},"PhoneNumberOperation":{"allOf":[{"$ref":"#/components/schemas/PhoneNumber"},{"type":"object","properties":{"provisioning":{"type":["object","null"],"properties":{"operationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["number_purchase","number_release"]},"status":{"type":"string"},"step":{"type":"string"},"lastError":{"type":["string","null"]}},"required":["operationId","kind","status","step","lastError"]}},"required":["provisioning"]}]},"ForwardingInstructions":{"type":"object","properties":{"carrier":{"type":"string"},"carrierName":{"type":"string"},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"steps":{"type":"array","items":{"type":"object","properties":{"when":{"type":"string"},"dial":{"type":"string"},"cancel":{"type":"string"}},"required":["when","dial","cancel"]}},"notes":{"type":"array","items":{"type":"string"}},"carriers":{"type":"array","items":{"type":"object","properties":{"carrier":{"type":"string"},"name":{"type":"string"}},"required":["carrier","name"]}}},"required":["carrier","carrierName","phoneNumber","steps","notes","carriers"]},"SmsMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"direction":{"type":"string","enum":["inbound","outbound"]},"conversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"contactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"fromE164":{"type":"string"},"toE164":{"type":"string"},"body":{"type":["string","null"]},"parts":{"type":"integer"},"status":{"type":"string"},"source":{"type":["string","null"]},"costMc":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","direction","conversationId","agentId","contactId","fromE164","toE164","body","parts","status","source","costMc","createdAt"]},"TrunkWithCredentials":{"allOf":[{"$ref":"#/components/schemas/Trunk"},{"type":"object","properties":{"credentials":{"type":["object","null"],"properties":{"username":{"type":"string"},"password":{"type":"string"},"sipAddress":{"type":"string"}},"required":["username","password","sipAddress"]},"ipAuthentication":{"type":["object","null"],"properties":{"header":{"type":"string","enum":["X-Telnyx-Token"]},"token":{"type":"string"},"transport":{"type":"string","enum":["TLS"]}},"required":["header","token","transport"]}},"required":["credentials","ipAuthentication"]}]},"ToolType":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"integration":{"type":["string","null"]},"secretFields":{"type":"array","items":{"type":"string"}},"supportedChannels":{"type":"array","items":{"type":"string","enum":["phone","chat","sms"]}},"configSchema":{"type":"object","additionalProperties":{},"description":"JSON Schema of `config`"},"available":{"type":"boolean"}},"required":["type","name","description","category","integration","secretFields","supportedChannels","configSchema","available"]},"AgentTool":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"type":{"type":"string"},"name":{"type":"string"},"instructions":{"type":["string","null"]},"config":{"type":"object","additionalProperties":{}},"channels":{"type":"array","items":{"type":"string","enum":["phone","chat","sms"]}},"secrets":{"type":"object","additionalProperties":{"type":"object","properties":{"set":{"type":"boolean","enum":[true]},"lastFour":{"type":["string","null"]}},"required":["set","lastFour"]},"description":"Write-only secrets: only whether each is set and its last four characters"},"sensitiveInputs":{"type":"array","items":{"type":"string"}},"integrationConnectionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"enabled":{"type":"boolean"},"position":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","agentId","type","name","instructions","config","channels","secrets","sensitiveInputs","integrationConnectionId","enabled","position","createdAt","updatedAt"]},"CreateAgentTool":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":["string","null"],"maxLength":20000},"config":{"type":"object","additionalProperties":{}},"secrets":{"type":"object","additionalProperties":{"type":["string","null"],"minLength":1,"maxLength":65536},"description":"Write-only credentials by field name (see the tool type's `secretFields`); null removes one"},"integrationConnectionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"channels":{"type":"array","items":{"type":"string","enum":["phone","chat","sms"]},"minItems":1},"enabled":{"type":"boolean"}},"required":["type","name","config"],"additionalProperties":false},"UpdateAgentTool":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":["string","null"],"maxLength":20000},"config":{"type":"object","additionalProperties":{}},"secrets":{"type":"object","additionalProperties":{"type":["string","null"],"minLength":1,"maxLength":65536},"description":"Write-only credentials by field name (see the tool type's `secretFields`); null removes one"},"channels":{"type":"array","items":{"type":"string","enum":["phone","chat","sms"]},"minItems":1},"enabled":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false},"ReorderAgentTools":{"type":"object","properties":{"toolIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":200}},"required":["toolIds"],"additionalProperties":false},"LanguageList":{"type":"array","items":{"$ref":"#/components/schemas/Language"}},"Language":{"type":"object","properties":{"code":{"type":"string","description":"BCP-47 code for `agents.language` and the language switcher"},"name":{"type":"string"},"engines":{"type":"array","items":{"type":"string","enum":["omega","beta"]},"description":"Voice engines that support it"}},"required":["code","name","engines"]},"VariableList":{"type":"array","items":{"$ref":"#/components/schemas/Variable"}},"Variable":{"type":"object","properties":{"name":{"type":"string","description":"Reference it as `$name` in tool URLs, headers, bodies and fixed messages"},"label":{"type":"string"},"description":{"type":"string"},"channels":{"type":"array","items":{"type":"string","enum":["phone","chat","widget","voicechat"]}}},"required":["name","label","description","channels"]},"AgentTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e","description":"null for echowin's industry and platform templates"},"industryId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"category":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"definition":{"$ref":"#/components/schemas/AgentDefinition"},"isClientTemplate":{"type":"boolean"},"published":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","industryId","category","name","description","definition","isClientTemplate","published","createdAt","updatedAt"]},"CreateAgentTemplate":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"category":{"type":["string","null"],"maxLength":100},"isClientTemplate":{"type":"boolean","description":"Agencies: offer it to clients"}},"required":["agentId","name"],"additionalProperties":false},"UpdateAgentTemplate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"category":{"type":["string","null"],"maxLength":100},"definition":{"$ref":"#/components/schemas/AgentDefinition"}},"additionalProperties":false},"Industry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"slug":{"type":"string"},"name":{"type":"string"},"regulated":{"type":"boolean"}},"required":["id","slug","name","regulated"]},"Client":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"status":{"type":"string","enum":["active","pending_approval","suspended","banned","deleted"]},"access":{"$ref":"#/components/schemas/EffectiveClientAccess"},"accessSettings":{"$ref":"#/components/schemas/ClientAccess"},"accessLocked":{"type":"boolean","description":"Sandbox agency: every switch is on and can't be changed"},"monthlyAllocationMc":{"type":["integer","null"],"description":"null = unlimited"},"usedThisMonthMc":{"type":"integer"},"paysOwnBilling":{"type":"boolean"},"templateId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","name","status","access","accessSettings","accessLocked","monthlyAllocationMc","usedThisMonthMc","paysOwnBilling","templateId","createdAt"]},"EffectiveClientAccess":{"type":"object","properties":{"users":{"type":"boolean"},"instructions":{"type":"boolean"},"instructionsWrite":{"type":"boolean"},"testing":{"type":"boolean"},"knowledgeBase":{"type":"boolean"},"agentConfiguration":{"type":"boolean"},"agentCreation":{"type":"boolean"}},"required":["users","instructions","instructionsWrite","testing","knowledgeBase","agentConfiguration","agentCreation"],"description":"Every switch, resolved (client setting, agency default, sandbox, staff overrides)"},"ClientAccess":{"type":"object","properties":{"users":{"type":"boolean"},"instructions":{"type":"boolean"},"instructionsWrite":{"type":"boolean"},"testing":{"type":"boolean"},"knowledgeBase":{"type":"boolean"},"agentConfiguration":{"type":"boolean"},"agentCreation":{"type":"boolean"}},"additionalProperties":false},"CreateClient":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"websiteUrl":{"type":"string","maxLength":2000,"format":"uri"},"templateId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e","description":"Create the client's first agent from this template"},"owner":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100}},"required":["email"],"additionalProperties":false,"description":"Invite this person as the client's owner"},"access":{"$ref":"#/components/schemas/ClientAccess"},"monthlyAllocationMc":{"type":["integer","null"],"minimum":0},"paysOwnBilling":{"type":"boolean","enum":[false]},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["name"],"additionalProperties":false},"UpdateClient":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"access":{"$ref":"#/components/schemas/ClientAccess"},"monthlyAllocationMc":{"type":["integer","null"],"minimum":0},"paysOwnBilling":{"type":"boolean","enum":[false]},"status":{"type":"string","enum":["active","suspended"]}},"additionalProperties":false},"ImportAgentToClient":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e","description":"An agent the caller can read (agency or another client)"},"templateId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"AssignClientNumber":{"type":"object","properties":{"phoneNumberId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["phoneNumberId"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":["string","null"]},"start":{"type":["string","null"],"description":"The first characters of the key, to recognise it"},"scopes":{"type":"array","items":{"type":"string"}},"createdBy":{"type":["string","null"]},"lastRequest":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","start","scopes","createdBy","lastRequest","expiresAt","enabled","createdAt"]},"CreatedApiKey":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","properties":{"key":{"type":"string","description":"The key itself. Shown only in this response; store it now."}},"required":["key"]}]},"CreateApiKey":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100,"description":"Actions (`contact.read`), resource wildcards (`contact.*`), `read`, or `*`"},"expiresAt":{"type":"string","format":"date-time","description":"Between 1 and 365 days from now"}},"required":["name","scopes"],"additionalProperties":false},"UpdateApiKey":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100,"description":"Actions (`contact.read`), resource wildcards (`contact.*`), `read`, or `*`"}},"additionalProperties":false},"OAuthGrantList":{"type":"array","items":{"$ref":"#/components/schemas/OAuthGrant"}},"OAuthGrant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"clientId":{"type":"string"},"name":{"type":["string","null"]},"uri":{"type":["string","null"]},"icon":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"grantedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"lastIssuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","clientId","name","uri","icon","scopes","active","grantedAt","lastIssuedAt"]},"UploadStarted":{"allOf":[{"$ref":"#/components/schemas/Upload"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"uploadExpiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["url","method","headers","uploadExpiresAt"]}]},"Upload":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"purpose":{"type":"string","enum":["knowledge_document","contact_import","port_document","agency_logo","widget_logo","caller_id_evidence","ticket_attachment"]},"fileName":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer"},"sha256":{"type":["string","null"]},"status":{"type":"string","enum":["pending","ready"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"completedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","purpose","fileName","contentType","sizeBytes","sha256","status","createdAt","completedAt","expiresAt"]},"CreateUpload":{"type":"object","properties":{"purpose":{"type":"string","enum":["knowledge_document","contact_import","port_document","agency_logo","widget_logo","caller_id_evidence","ticket_attachment"]},"fileName":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":150},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"}},"required":["purpose","fileName","contentType","sizeBytes"],"additionalProperties":false},"Workflow":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"description":{"type":["string","null"]},"active":{"type":"boolean"},"publishedVersionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"draft":{"$ref":"#/components/schemas/WorkflowGraph"},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowTrigger"}},"publishedVersion":{"$ref":"#/components/schemas/WorkflowVersion"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","agentId","name","description","active","publishedVersionId","draft","createdAt","updatedAt"]},"WorkflowGraph":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","minLength":1,"maxLength":50},"config":{"type":"object","additionalProperties":{},"default":{}},"position":{"type":["object","null"],"properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]}},"required":["id","type"],"additionalProperties":false},"maxItems":200,"default":[]},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":100},"to":{"type":"string","minLength":1,"maxLength":100},"outlet":{"type":"string","minLength":1,"maxLength":100,"default":"default"}},"required":["from","to"],"additionalProperties":false},"maxItems":1000,"default":[]},"settings":{"type":["object","null"],"additionalProperties":{}}},"additionalProperties":false},"WorkflowTrigger":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"workflowId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"trigger":{"type":"string","enum":["pre_call","post_call","post_chat","manual","schedule","event"]},"enabled":{"type":"boolean"},"position":{"type":"integer"},"waitForResult":{"type":"boolean"},"schedule":{"type":["string","null"]},"eventType":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","workflowId","agentId","trigger","enabled","position","waitForResult","schedule","eventType","createdAt","updatedAt"]},"WorkflowVersion":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"workflowId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"version":{"type":"integer"},"graph":{"$ref":"#/components/schemas/WorkflowGraph"},"createdBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","workflowId","version","graph","createdBy","createdAt"]},"WorkflowNodeType":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"outlets":{"type":["array","null"],"items":{"type":"string"}},"triggers":{"type":["array","null"],"items":{"type":"string"}},"external":{"type":"boolean"},"configSchema":{"type":"object","additionalProperties":{}},"available":{"type":"boolean"}},"required":["type","name","description","category","outlets","triggers","external","configSchema","available"]},"WorkflowExecution":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"workflowId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"versionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"trigger":{"type":"string","enum":["pre_call","post_call","post_chat","manual","schedule","event"]},"conversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"isTest":{"type":"boolean"},"input":{"type":["object","null"],"additionalProperties":{}},"output":{"type":["object","null"],"additionalProperties":{}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"completedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"nodeResults":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"nodeId":{"type":"string"},"nodeType":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"input":{"type":["object","null"],"additionalProperties":{}},"output":{"type":["object","null"],"additionalProperties":{}},"toolCalls":{"type":["array","null"],"items":{"type":"object","additionalProperties":{}}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"completedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","nodeId","nodeType","status","input","output","toolCalls","error","startedAt","completedAt"]}},"smsDelivery":{"type":"object","properties":{"accepted":{"type":"number"},"delivered":{"type":"number"},"failed":{"type":"number"},"pending":{"type":"number"}},"required":["accepted","delivered","failed","pending"]}},"required":["id","tenantId","workflowId","versionId","trigger","conversationId","status","isTest","input","output","error","startedAt","completedAt","createdAt"]},"Campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","canceled"]},"config":{"type":"object","properties":{"instructions":{"type":"string"},"timeZone":{"type":["string","null"]},"callingHours":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"days":{"type":"array","items":{"type":"string"}}},"required":["start","end","days"]},"retry":{"type":"object","properties":{"maxAttempts":{"type":"integer"},"intervalMinutes":{"type":"integer"}},"required":["maxAttempts","intervalMinutes"]},"consentAttestation":{"type":["object","null"],"properties":{"statement":{"type":"string"},"attestedBy":{"type":["string","null"]},"attestedAt":{"type":"string"}},"required":["statement","attestedBy","attestedAt"]},"startAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"importMapping":{"type":["object","null"],"additionalProperties":{"type":"string"}}},"required":["instructions","timeZone","callingHours","retry","consentAttestation","startAt","importMapping"]},"configInvalid":{"type":"array","items":{"type":"string"}},"pauseReason":{"type":["string","null"]},"startedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"completedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"counts":{"type":"object","properties":{"pending":{"type":"integer"},"dialing":{"type":"integer"},"inCall":{"type":"integer"},"completed":{"type":"integer"},"noAnswer":{"type":"integer"},"busy":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"},"doNotCall":{"type":"integer"}},"required":["pending","dialing","inCall","completed","noAnswer","busy","failed","skipped","doNotCall"]}},"required":["id","tenantId","agentId","phoneNumberId","name","status","config","configInvalid","pauseReason","startedAt","completedAt","createdBy","createdAt","updatedAt","counts"]},"CampaignStats":{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"totalContacts":{"type":"integer"},"counts":{"type":"object","properties":{"pending":{"type":"integer"},"dialing":{"type":"integer"},"inCall":{"type":"integer"},"completed":{"type":"integer"},"noAnswer":{"type":"integer"},"busy":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"},"doNotCall":{"type":"integer"}},"required":["pending","dialing","inCall","completed","noAnswer","busy","failed","skipped","doNotCall"]},"attempts":{"type":"integer"},"progress":{"type":"number"},"answerRate":{"type":["number","null"]},"lastActivityAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"calls":{"type":"integer"},"answeredCalls":{"type":"integer"},"talkSeconds":{"type":"integer"},"transferred":{"type":"integer"},"recentTransfers":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"contactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":["string","null"]},"toAddress":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["conversationId","contactId","name","toAddress","startedAt"]}}},"required":["campaignId","totalContacts","counts","attempts","progress","answerRate","lastActivityAt","calls","answeredCalls","talkSeconds","transferred","recentTransfers"]},"CampaignContact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"campaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"contactId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["pending","dialing","in_call","completed","no_answer","busy","failed","skipped","do_not_call"]},"attempts":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"lastConversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"context":{"type":["object","null"],"additionalProperties":{}},"statusDetail":{"type":["object","null"],"additionalProperties":{}},"contact":{"type":"object","properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"e164":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["firstName","lastName","e164","email"]}},"required":["id","campaignId","contactId","status","attempts","nextAttemptAt","lastConversationId","context","statusDetail","contact"]},"ScheduledCall":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"contactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"toE164":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"status":{"type":"string","enum":["pending","dialing","completed","failed","canceled"]},"attempts":{"type":"integer"},"maxAttempts":{"type":"integer"},"retryIntervalMinutes":{"type":"integer"},"instructions":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"lastConversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"idempotencyKey":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","agentId","phoneNumberId","contactId","toE164","scheduledAt","status","attempts","maxAttempts","retryIntervalMinutes","instructions","metadata","lastConversationId","idempotencyKey","createdAt","updatedAt"]},"CallConsent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string"},"contactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"type":{"type":"string","enum":["prior_express","prior_express_written","existing_business_relationship"]},"source":{"type":"string","enum":["web_form","verbal","written","import","api","other"]},"capturedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"evidence":{"type":"object","additionalProperties":{}},"attestation":{"type":["object","null"],"additionalProperties":{}},"active":{"type":"boolean"},"revokedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"revokedReason":{"type":["string","null"]},"createdBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","e164","contactId","type","source","capturedAt","evidence","attestation","active","revokedAt","revokedReason","createdBy","createdAt","updatedAt"]},"Ticket":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"number":{"type":"integer"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","pending","on_hold","solved","closed"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"type":{"type":"string"},"conversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"requesterUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"lastMessageAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"solvedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","number","tenantId","subject","status","priority","type","conversationId","requesterUserId","lastMessageAt","solvedAt","createdAt","updatedAt"]},"TicketMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"ticketId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"author":{"type":"string","enum":["customer","support"]},"authorUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"body":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","ticketId","author","authorUserId","body","uploadIds","createdAt"]},"StaffTicket":{"allOf":[{"$ref":"#/components/schemas/Ticket"},{"type":"object","properties":{"scope":{"type":"string","enum":["customer","internal"]},"tags":{"type":"array","items":{"type":"string"}},"assigneeUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"requesterEmail":{"type":["string","null"]},"requesterName":{"type":["string","null"]},"source":{"type":"string"},"firstResponseDueAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"resolutionDueAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"firstRespondedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"closedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"legacySource":{"type":["string","null"]},"legacyId":{"type":["string","null"]}},"required":["scope","tags","assigneeUserId","requesterEmail","requesterName","source","firstResponseDueAt","resolutionDueAt","firstRespondedAt","closedAt","legacySource","legacyId"]}]},"StaffTicketMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"ticketId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["reply","note","draft"]},"authorType":{"type":"string","enum":["customer","staff","system","ai"]},"authorUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"fromEmail":{"type":["string","null"]},"body":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"sentAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","ticketId","kind","authorType","authorUserId","fromEmail","body","uploadIds","sentAt","createdAt"]},"EventType":{"type":"object","properties":{"type":{"type":"string"},"class":{"type":"string","enum":["audit","activity"]},"target":{"type":"string"},"phase":{"type":"string"},"description":{"type":"string"}},"required":["type","class","target","phase","description"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":["string","null"]},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"legacyType":{"type":["string","null"]},"sensitiveData":{"type":"string","enum":["masked","full"]},"enabled":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"failingSince":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","url","events","legacyType","sensitiveData","enabled","disabledReason","failingSince","createdAt","updatedAt"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"endpointId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"eventType":{"type":"string"},"eventId":{"type":"string"},"status":{"type":"string","enum":["pending","delivering","delivered","failed","dead"]},"attempts":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"responseStatus":{"type":["integer","null"]},"responseExcerpt":{"type":["string","null"]},"durationMs":{"type":["integer","null"]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"deliveredAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"event":{"type":["object","null"],"additionalProperties":{}}},"required":["id","endpointId","eventType","eventId","status","attempts","nextAttemptAt","responseStatus","responseExcerpt","durationMs","lastError","createdAt","deliveredAt"]},"Event":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"type":{"type":"string"},"apiVersion":{"type":"string","enum":["2"]},"occurredAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"actor":{"type":"object","additionalProperties":{}},"origin":{"type":"string"},"target":{"type":"object","additionalProperties":{}},"data":{"type":"object","additionalProperties":{}},"requestId":{"type":["string","null"]},"auditSeq":{"type":["integer","null"]}},"required":["id","type","apiVersion","occurredAt","tenantId","actor","origin","target","data","requestId","auditSeq"]},"BillingAccount":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["active","past_due","paused","closed"]},"pooled":{"type":"boolean"},"availableMc":{"type":"integer"},"debtMc":{"type":"integer"},"buckets":{"type":["object","null"],"properties":{"plan":{"type":"integer"},"promo":{"type":"integer"},"purchased":{"type":"integer"}},"required":["plan","promo","purchased"]},"autoReload":{"type":"boolean"},"autoReloadThresholdMc":{"type":["integer","null"]},"autoReloadAmountMc":{"type":["integer","null"]},"pausedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"pauseReason":{"type":["string","null"]},"pastDueSince":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"graceEndsAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"disputed":{"type":"boolean"},"smsFreePartsRemaining":{"type":"integer"},"hasPaymentMethod":{"type":["boolean","null"]},"allocation":{"type":["object","null"],"properties":{"monthlyAllocationMc":{"type":["integer","null"]},"usedThisMonthMc":{"type":"integer"},"remainingMc":{"type":["integer","null"]},"periodStart":{"type":"string"}},"required":["monthlyAllocationMc","usedThisMonthMc","remainingMc","periodStart"]}},"required":["tenantId","status","pooled","availableMc","debtMc","buckets","autoReload","autoReloadThresholdMc","autoReloadAmountMc","pausedAt","pauseReason","pastDueSince","graceEndsAt","disputed","smsFreePartsRemaining","hasPaymentMethod","allocation"]},"Entitlements":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"planCode":{"type":"string"},"agencyLabel":{"type":["string","null"],"enum":["grey","white",null]},"features":{"type":"object","additionalProperties":{}},"access":{"type":["object","null"],"additionalProperties":{"type":"boolean"}},"sources":{"type":"object","additionalProperties":{"type":"string"}},"sandboxAgency":{"type":"boolean"}},"required":["tenantId","planCode","agencyLabel","features","access","sources","sandboxAgency"]},"Plan":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"code":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["base","bundle","minutes","agency","number","custom","legacy","addon"]},"public":{"type":"boolean"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/PlanVersion"}}},"required":["id","code","name","kind","public","versions"]},"PlanVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","active","grandfathered","retired"]},"listPrices":{"type":"object","additionalProperties":{"type":"integer"}},"intervals":{"type":"array","items":{"type":"string","enum":["month","year"]}},"monthlyAllowanceMc":{"type":"integer"},"smsFreeParts":{"type":"integer"},"rates":{"type":"object","additionalProperties":{}},"features":{"type":"object","additionalProperties":{}},"agencyLabel":{"type":["string","null"]},"subscribed":{"type":"boolean"}},"required":["id","version","status","listPrices","intervals","monthlyAllowanceMc","smsFreeParts","rates","features","agencyLabel","subscribed"]},"Subscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"planId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"planVersionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"planCode":{"type":"string"},"planName":{"type":"string"},"kind":{"type":"string","enum":["base","bundle","minutes","agency","number","custom","legacy","addon"]},"status":{"type":"string","enum":["trialing","active","past_due","paused","canceled","incomplete","unpaid"]},"interval":{"type":["string","null"],"enum":["month","year",null]},"quantity":{"type":"integer"},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"currentPeriodStart":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"currentPeriodEnd":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"trialEndsAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"canceledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"pausedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"managedByStripe":{"type":"boolean"},"scheduledChange":{"type":["object","null"],"properties":{"planVersionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"planName":{"type":"string"},"interval":{"type":"string","enum":["month","year"]},"quantity":{"type":"integer"},"at":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["planVersionId","planName","interval","quantity","at"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","planId","planVersionId","planCode","planName","kind","status","interval","quantity","phoneNumberId","currentPeriodStart","currentPeriodEnd","trialEndsAt","cancelAt","canceledAt","pausedAt","managedByStripe","scheduledChange","createdAt","updatedAt"]},"LedgerEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["opening","grant","charge","expiry","refund","adjustment","transfer"]},"bucket":{"type":"string","enum":["plan","promo","purchased"]},"amountMc":{"type":"integer"},"grantId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"usageEventId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","kind","bucket","amountMc","grantId","usageEventId","description","createdAt"]},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"expMonth":{"type":["integer","null"]},"expYear":{"type":["integer","null"]},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","type","brand","last4","expMonth","expYear","isDefault","createdAt"]},"CreditGrant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"bucket":{"type":"string","enum":["plan","promo","purchased"]},"amountMc":{"type":"integer"},"remainingMc":{"type":"integer"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","bucket","amountMc","remainingMc","expiresAt","source","createdAt"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"amountDueCents":{"type":"integer"},"amountPaidCents":{"type":"integer"},"currency":{"type":"string"},"periodStart":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"periodEnd":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"hostedUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","status","amountDueCents","amountPaidCents","currency","periodStart","periodEnd","hostedUrl","createdAt","updatedAt"]},"PromoRedemption":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"code":{"type":"string"},"creditsMc":{"type":"integer"},"ledgerEntryId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","code","creditsMc","ledgerEntryId","createdAt"]},"UsageRow":{"type":"object","properties":{"day":{"type":["string","null"]},"kind":{"type":["string","null"]},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"clientId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"quantity":{"type":["number","null"]},"chargedMc":{"type":"integer"},"events":{"type":"integer"}},"required":["day","kind","agentId","clientId","quantity","chargedMc","events"]},"UsageEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"conversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"model":{"type":["string","null"]},"occurredAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"ratedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"chargedMc":{"type":"integer"}},"required":["id","tenantId","kind","quantity","unit","conversationId","model","occurredAt","ratedAt","chargedMc"]},"Referral":{"type":"object","properties":{"code":{"type":["string","null"]},"isActive":{"type":"boolean"},"referralLink":{"type":["string","null"]},"rewards":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","successful","rewarded","voided"]},"count":{"type":"integer"}},"required":["status","count"]}}},"required":["code","isActive","referralLink","rewards"]},"ChatWidget":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"publicKey":{"type":"string"},"websiteUrl":{"type":["string","null"]},"allowedDomains":{"type":"array","items":{"type":"string"}},"initialMessage":{"type":["string","null"]},"suggestions":{"type":"array","items":{"type":"string"}},"theme":{"type":["string","null"]},"logoUrl":{"type":["string","null"]},"voiceMode":{"type":"boolean"},"config":{"type":"object","additionalProperties":{}},"embedScriptUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","agentId","name","publicKey","websiteUrl","allowedDomains","initialMessage","suggestions","theme","logoUrl","voiceMode","config","embedScriptUrl","createdAt","updatedAt"]},"ChatWidgetConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"quickSuggestions":{"type":"boolean"},"idleMessage":{"type":["object","null"],"properties":{"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":1000}},"required":["title","body"],"additionalProperties":false},"leadForm":{"type":["object","null"],"properties":{"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"label":{"type":"string","maxLength":200},"type":{"type":"string","enum":["text","email","phone","number","select","textarea","checkbox"]},"placeholder":{"type":"string","maxLength":200},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false},"maxItems":50},"min":{"type":"number"},"max":{"type":"number"}},"required":["name","label","type"],"additionalProperties":false},"maxItems":10},"required":{"type":"boolean"}},"required":["fields","required"],"additionalProperties":false},"startOver":{"type":"boolean"},"menuChips":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":10},"layout":{"type":"string","enum":["floating","large"]}},"additionalProperties":false},"Integration":{"type":"object","properties":{"provider":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"auth":{"type":"string","enum":["oauth","api_key"]},"resources":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean"},"connections":{"type":"integer"}},"required":["provider","name","category","auth","resources","available","connections"]},"IntegrationConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"provider":{"type":"string"},"externalAccountId":{"type":["string","null"]},"displayName":{"type":["string","null"]},"scopes":{"type":["array","null"],"items":{"type":"string"}},"tokenExpiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"status":{"type":"string"},"lastError":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"connectedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","provider","externalAccountId","displayName","scopes","tokenExpiresAt","status","lastError","metadata","connectedBy","createdAt","updatedAt"]},"ProviderResource":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"primary":{"type":"boolean"},"timeZone":{"type":["string","null"]}},"required":["id","name","type"]},"Calendar":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"timezone":{"type":"string"},"availability":{"type":"object","additionalProperties":{}},"slotMinutes":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","name","timezone","availability","slotMinutes","createdAt","updatedAt"]},"Slot":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"endsAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"timeZone":{"type":"string"}},"required":["startsAt","endsAt","timeZone"]},"Appointment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"calendarId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"integrationConnectionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"externalId":{"type":["string","null"]},"contactId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"conversationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"title":{"type":["string","null"]},"startsAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"endsAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"status":{"type":"string"},"details":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","calendarId","integrationConnectionId","externalId","contactId","conversationId","title","startsAt","endsAt","status","details","createdAt","updatedAt"]},"OnboardingAgencyBrand":{"type":"object","properties":{"host":{"type":"string"},"displayName":{"type":"string"},"label":{"type":"string","enum":["grey","white"]}},"required":["host","displayName","label"]},"OnboardingSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"step":{"type":"string","enum":["building","ready","failed","claimed","expired"]},"kind":{"type":"string","enum":["business","agency"]},"activationGate":{"type":["string","null"],"enum":["pending_approval","unavailable",null]},"phoneService":{"$ref":"#/components/schemas/PhoneService"},"websiteUrl":{"type":["string","null"]},"build":{"type":"object","properties":{"status":{"type":"string","enum":["building","ready","failed"]},"stage":{"type":"string"},"error":{"type":["string","null"]}},"required":["status","stage","error"]},"businessProfile":{"type":["object","null"],"additionalProperties":{}},"agent":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"initialMessage":{"type":["string","null"]},"instructions":{"type":"string"}},"required":["id","name","initialMessage","instructions"]},"reservation":{"$ref":"#/components/schemas/OnboardingNumberReservation"},"demo":{"type":"object","properties":{"secondsLimit":{"type":"integer"},"secondsRemaining":{"type":"integer"}},"required":["secondsLimit","secondsRemaining"]},"tenantId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e","description":"Set once the session is claimed"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"claimedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","step","kind","activationGate","phoneService","websiteUrl","build","businessProfile","agent","reservation","demo","tenantId","expiresAt","claimedAt","createdAt"]},"OnboardingNumberReservation":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"e164":{"type":"string"},"carrier":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"onboardingSessionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["id","e164","carrier","status","expiresAt","onboardingSessionId"]},"CreateOnboardingSession":{"type":"object","properties":{"websiteUrl":{"type":"string","maxLength":2000,"format":"uri"},"googleBusinessProfileUrl":{"type":"string","maxLength":2000,"format":"uri"},"businessName":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":20,"maxLength":4000,"description":"What the business does, used when there is no website"},"kind":{"type":"string","enum":["business","agency"],"default":"business"},"agencyHost":{"type":"string","minLength":3,"maxLength":253},"templateId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"source":{"type":"string","maxLength":100}},"additionalProperties":false},"UpdateOnboardingSession":{"type":"object","properties":{"businessProfile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":["string","null"],"maxLength":40},"address":{"type":["string","null"],"maxLength":500},"hours":{"type":["string","null"],"maxLength":1000},"transferNumber":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{6,14}$"},"timezone":{"type":["string","null"],"maxLength":64}},"additionalProperties":false},"agentDraft":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"instructions":{"type":"string","minLength":1,"maxLength":20000},"initialMessage":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false}},"additionalProperties":false},"RetryOnboardingBuild":{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":20,"maxLength":4000,"description":"What the business does, used instead of the website when it can't be read"}},"additionalProperties":false},"OnboardingClaim":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"reservationId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["tenantId","agentId","reservationId"]},"Checklist":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"done":{"type":"boolean"}},"required":["key","title","done"]}},"doneCount":{"type":"integer"},"total":{"type":"integer"},"dismissed":{"type":"boolean"},"complete":{"type":"boolean"}},"required":["items","doneCount","total","dismissed","complete"]},"GoLiveResult":{"type":"object","properties":{"checkoutUrl":{"type":"string"},"phoneNumber":{"type":"object","additionalProperties":{}},"forwarding":{"type":["object","null"],"additionalProperties":{}},"verificationCall":{"type":"null"}}},"GoLive":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"reservationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"forwarding":{"type":"object","properties":{"carrier":{"type":"string"}},"additionalProperties":false},"trunkId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"creditsMc":{"type":"integer","minimum":0,"maximum":100000000,"default":0},"successUrl":{"type":"string","maxLength":2000,"format":"uri"},"cancelUrl":{"type":"string","maxLength":2000,"format":"uri"}},"required":["agentId"],"additionalProperties":false},"SelfOnboardingView":{"allOf":[{"$ref":"#/components/schemas/SelfOnboarding"},{"type":"object","properties":{"accessLocked":{"type":"boolean"},"link":{"type":"object","properties":{"url":{"type":["string","null"]},"domain":{"type":["string","null"]},"domainStatus":{"type":["string","null"]},"displayName":{"type":"string"}},"required":["url","domain","domainStatus","displayName"]}},"required":["accessLocked","link"],"additionalProperties":false}]},"SelfOnboarding":{"type":"object","properties":{"enabled":{"type":"boolean"},"templateId":{"type":["string","null"],"format":"uuid","default":null,"example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"defaultAccess":{"$ref":"#/components/schemas/ClientAccess"},"paysOwnBilling":{"type":"boolean","enum":[false],"default":false},"monthlyAllocationMc":{"type":["integer","null"],"minimum":0,"default":null}},"required":["enabled"],"additionalProperties":false},"AnalyticsSeries":{"type":"object","properties":{"from":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"to":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"interval":{"type":"string","enum":["hour","day","week"]},"timezone":{"type":"string"},"totals":{"type":"object","additionalProperties":{"type":"number"}},"series":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"breakdowns":{"type":"object","additionalProperties":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":["string","null"]},"count":{"type":"number"}},"required":["key","count"]}},{"type":"array","items":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"open":{"type":"number"},"closed":{"type":"number"}},"required":["hour","open","closed"]}}]}},"afterHours":{"type":"object","properties":{"current":{"type":"number"},"previous":{"type":"number"},"timezone":{"type":"string"}},"required":["current","previous","timezone"]}},"required":["from","to","interval","timezone","totals","series","breakdowns"]},"TeamInsights":{"type":"object","properties":{"from":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"to":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"tenants":{"type":"array","items":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"kind":{"type":"string"},"calls":{"type":"number"},"callSeconds":{"type":"number"},"chats":{"type":"number"},"toolCalls":{"type":"number"},"creditsUsedMc":{"type":"number"}},"required":["tenantId","name","kind","calls","callSeconds","chats","toolCalls","creditsUsedMc"]}},"totals":{"type":"object","properties":{"calls":{"type":"number"},"callSeconds":{"type":"number"},"chats":{"type":"number"},"toolCalls":{"type":"number"},"creditsUsedMc":{"type":"number"}},"required":["calls","callSeconds","chats","toolCalls","creditsUsedMc"]}},"required":["from","to","tenants","totals"]},"Dashboard":{"type":"object","properties":{"timezone":{"type":"string"},"today":{"type":"object","properties":{"calls":{"type":"number"},"chats":{"type":"number"},"answered":{"type":"number"},"durationSeconds":{"type":"number"}},"required":["calls","chats","answered","durationSeconds"]},"liveCalls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"channel":{"type":"string"},"direction":{"type":"string"},"status":{"type":"string"},"fromAddress":{"type":["string","null"]},"toAddress":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","agentId","channel","direction","status","fromAddress","toAddress","startedAt"]}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"channel":{"type":"string"},"direction":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"durationMs":{"type":["number","null"]},"summary":{"type":["string","null"]}},"required":["id","agentId","channel","direction","status","startedAt","durationMs","summary"]}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string"},"numbers":{"type":"number"},"liveCalls":{"type":"number"},"lastConversationAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","name","numbers","liveCalls","lastConversationAt"]}},"checklist":{"type":"object","properties":{"agentCreated":{"type":"boolean"},"numberConnected":{"type":"boolean"},"knowledgeAdded":{"type":"boolean"},"testConversation":{"type":"boolean"},"firstLiveConversation":{"type":"boolean"}},"required":["agentCreated","numberConnected","knowledgeAdded","testConversation","firstLiveConversation"]}},"required":["timezone","today","liveCalls","recent","agents","checklist"]},"TagInsights":{"type":"object","properties":{"from":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"to":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"count":{"type":"number"},"previousCount":{"type":"number"},"pinned":{"type":"boolean"},"values":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]}}},"required":["name","type","count","previousCount","pinned","values"]}}},"required":["from","to","tags"]},"TagPreference":{"type":"object","properties":{"tagName":{"type":"string"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"pinned":{"type":"boolean"},"hidden":{"type":"boolean"},"settings":{"type":["object","null"],"additionalProperties":{}},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["tagName","agentId","pinned","hidden","settings","updatedAt"]},"InsightDigest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"content":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","agentId","kind","periodStart","periodEnd","content","createdAt"]},"ActionableInsight":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"title":{"type":"string"},"body":{"type":["string","null"]},"status":{"type":"string"},"data":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","agentId","title","body","status","data","createdAt","updatedAt"]},"SearchHit":{"type":"object","properties":{"type":{"type":"string","enum":["agents","conversations","contacts","numbers"]},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"title":{"type":"string"},"subtitle":{"type":["string","null"]}},"required":["type","id","title","subtitle"]},"AuditEvent":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"seq":{"type":"integer"},"occurredAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"actorType":{"type":"string"},"actorId":{"type":["string","null"]},"impersonatorId":{"type":["string","null"]},"action":{"type":"string"},"targetType":{"type":["string","null"]},"targetId":{"type":["string","null"]},"diff":{"type":["object","null"],"additionalProperties":{}},"reason":{"type":["string","null"]},"requestId":{"type":["string","null"]},"origin":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{}},"ip":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"prevHash":{"type":"string"},"hash":{"type":"string"}},"required":["tenantId","seq","occurredAt","actorType","actorId","impersonatorId","action","targetType","targetId","diff","reason","requestId","origin","metadata","prevHash","hash"]},"AuditVerifyResult":{"type":"object","properties":{"valid":{"type":"boolean"},"checked":{"type":"integer"},"firstBreak":{"type":["object","null"],"properties":{"seq":{"type":["integer","null"]},"reason":{"type":"string"},"message":{"type":"string"}},"required":["seq","reason","message"]}},"required":["valid","checked","firstBreak"]},"ComplianceSettings":{"type":"object","properties":{"complianceLevel":{"type":"string","enum":["standard","regulated"]},"maskingPolicy":{"type":"object","additionalProperties":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]}},"effective":{"type":"object","additionalProperties":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]}},"enforceForClients":{"type":"boolean"},"agencyPolicy":{"type":["object","null"],"additionalProperties":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]}}},"required":["complianceLevel","maskingPolicy","effective","enforceForClients","agencyPolicy"]},"RetentionPolicy":{"type":"object","properties":{"dataType":{"type":"string","enum":["conversations","recordings","contacts","all"]},"retainDays":{"type":["integer","null"]},"legalHold":{"type":"boolean"},"legalHoldReason":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["dataType","retainDays","legalHold","legalHoldReason","updatedAt"]},"ExportJob":{"allOf":[{"$ref":"#/components/schemas/DataJob"},{"type":"object","properties":{"downloadExpiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["downloadUrl","downloadExpiresAt"]}]},"LeadReceipt":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["received"]}},"required":["id","status"]},"CreateLead":{"type":"object","properties":{"kind":{"type":"string","enum":["contact","demo","webinar","white_label_waitlist","waitlist","solutions"]},"email":{"type":"string","maxLength":320,"format":"email"},"name":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":40},"company":{"type":"string","maxLength":200},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":5000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"source":{"type":"string","maxLength":500}},"required":["kind","email"],"additionalProperties":false},"DemoSession":{"type":"object","properties":{"wsUrl":{"type":"string"},"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"sessionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["wsUrl","token","expiresAt","sessionId"]},"CreateDemoSession":{"type":"object","properties":{"demoAgentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["demoAgentId"],"additionalProperties":false},"UnsubscribeResult":{"type":"object","properties":{"status":{"type":"string","enum":["unsubscribed","already","required"],"description":"`unsubscribed`: this kind of email is off for you; `already`: you no longer received it; `required`: team owners keep this alert (D104), nothing changed"},"category":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["status","category","description"]}},"parameters":{}},"paths":{"/me/product-events":{"post":{"operationId":"me.productEvents.capture","tags":["Browser product telemetry"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event":{"type":"string","enum":["pageview","exception"]},"surface":{"type":"string","enum":["agents","knowledge","contacts","live","calls","campaigns","workflows","numbers","clients","analytics","billing","support","settings","integrations","notifications","changelog","start","other"]},"source":{"type":"string","enum":["navigation","error","unhandledrejection"]}},"required":["id","event","surface","source"],"additionalProperties":false}}}},"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/me":{"patch":{"operationId":"me.update","x-echowin-permission":"self","tags":["Identity"],"summary":"Update the user's profile","description":"Changes the signed-in user's display name or avatar through Better Auth. API keys have no profile. Email, password and two-factor changes stay on the Better Auth endpoints because they need re-authentication.","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMe"}}}},"responses":{"200":{"description":"The updated profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"me.get","x-echowin-permission":"self","tags":["Identity"],"summary":"The caller: user and memberships, or the API key","security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"The caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/me/notification-preferences":{"get":{"operationId":"me.notificationPreferences.get","x-echowin-permission":"self","tags":["Identity"],"summary":"The user's notification preferences in the acting tenant","security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"me.notificationPreferences.update","x-echowin-permission":"self","tags":["Identity"],"summary":"Set the user's notification preferences","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesUpdate"}}}},"responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/notifications":{"get":{"operationId":"notifications.list","tags":["Notifications"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"unread","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":40},"required":false,"name":"level","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/notifications/read-all":{"post":{"operationId":"notifications.markAllRead","tags":["Notifications"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"}},"required":["updated"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/notifications/{notificationId}/read":{"post":{"operationId":"notifications.markRead","tags":["Notifications"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"notificationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletter-audiences":{"get":{"operationId":"admin.newsletterAudiences.list","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"consentText":{"type":"string","minLength":20,"maxLength":1000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"enabled":{"type":"boolean"},"joinUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["name","consentText","id","tenantId","enabled","joinUrl","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"admin.newsletterAudiences.create","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"consentText":{"type":"string","minLength":20,"maxLength":1000}},"required":["name","consentText"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"consentText":{"type":"string","minLength":20,"maxLength":1000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"enabled":{"type":"boolean"},"joinUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["name","consentText","id","tenantId","enabled","joinUrl","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletter-audiences/{audienceId}":{"patch":{"operationId":"admin.newsletterAudiences.update","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"audienceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"consentText":{"type":"string","minLength":20,"maxLength":1000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"enabled":{"type":"boolean"},"joinUrl":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["name","consentText","id","tenantId","enabled","joinUrl","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletters":{"get":{"operationId":"admin.newsletters.list","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"enqueued":{"type":"number"},"batchComplete":{"type":"boolean"},"deliveryEnabled":{"type":"boolean"},"queuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"approvedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["audienceId","name","subject","body","id","tenantId","status","enqueued","batchComplete","deliveryEnabled","queuedAt","cancelledAt","approvedBy","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"admin.newsletters.create","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000}},"required":["audienceId","name","subject","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"enqueued":{"type":"number"},"batchComplete":{"type":"boolean"},"deliveryEnabled":{"type":"boolean"},"queuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"approvedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["audienceId","name","subject","body","id","tenantId","status","enqueued","batchComplete","deliveryEnabled","queuedAt","cancelledAt","approvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletters/{newsletterId}":{"get":{"operationId":"admin.newsletters.get","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"newsletterId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"enqueued":{"type":"number"},"batchComplete":{"type":"boolean"},"deliveryEnabled":{"type":"boolean"},"queuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"approvedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["audienceId","name","subject","body","id","tenantId","status","enqueued","batchComplete","deliveryEnabled","queuedAt","cancelledAt","approvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"admin.newsletters.update","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"newsletterId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"enqueued":{"type":"number"},"batchComplete":{"type":"boolean"},"deliveryEnabled":{"type":"boolean"},"queuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"approvedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["audienceId","name","subject","body","id","tenantId","status","enqueued","batchComplete","deliveryEnabled","queuedAt","cancelledAt","approvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletters/{newsletterId}/preview":{"post":{"operationId":"admin.newsletters.preview","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"newsletterId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["subject","html","text"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletters/{newsletterId}/queue":{"post":{"operationId":"admin.newsletters.queue","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"newsletterId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audienceApproved":{"type":"boolean","enum":[true]},"copyApproved":{"type":"boolean","enum":[true]}},"required":["audienceApproved","copyApproved"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"enqueued":{"type":"number"},"batchComplete":{"type":"boolean"},"deliveryEnabled":{"type":"boolean"},"queuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"approvedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["audienceId","name","subject","body","id","tenantId","status","enqueued","batchComplete","deliveryEnabled","queuedAt","cancelledAt","approvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/newsletters/{newsletterId}/cancel":{"post":{"operationId":"admin.newsletters.cancel","tags":["Admin (staff only)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"newsletterId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"audienceId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":150},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":30000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string"},"enqueued":{"type":"number"},"batchComplete":{"type":"boolean"},"deliveryEnabled":{"type":"boolean"},"queuedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"cancelledAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"approvedBy":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["audienceId","name","subject","body","id","tenantId","status","enqueued","batchComplete","deliveryEnabled","queuedAt","cancelledAt","approvedBy","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/shopify-privacy-requests":{"get":{"operationId":"admin.shopifyPrivacyRequests.list","tags":["Shopify privacy requests"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.audit.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"bindingId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"topic":{"type":"string"},"status":{"type":"string"},"ticketId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"resolvedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","bindingId","topic","status","ticketId","createdAt","resolvedAt"]}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/shopify-privacy-requests/{requestId}":{"get":{"operationId":"admin.shopifyPrivacyRequests.get","tags":["Shopify privacy requests"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.data.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"bindingId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"topic":{"type":"string"},"status":{"type":"string"},"ticketId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"resolvedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"payload":{"type":"object","additionalProperties":{}},"resolution":{}},"required":["id","tenantId","bindingId","topic","status","ticketId","createdAt","resolvedAt","payload"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/shopify-privacy-requests/{requestId}/resolve":{"post":{"operationId":"admin.shopifyPrivacyRequests.resolve","tags":["Shopify privacy requests"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.data.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"requestId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["processed","no_retained_data","legal_hold"]},"reason":{"type":"string","minLength":20,"maxLength":1000},"requestScopeVerified":{"type":"boolean","enum":[true]},"dataJobIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":100,"default":[]}},"required":["outcome","reason","requestScopeVerified"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"bindingId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"topic":{"type":"string"},"status":{"type":"string"},"ticketId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"resolvedAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","tenantId","bindingId","topic","status","ticketId","createdAt","resolvedAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agency/custom-domain":{"get":{"operationId":"agency.customDomain.get","tags":["Agency domains"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"agency.customDomain.set","tags":["Agency domains"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":3,"maxLength":253}},"required":["hostname"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"agency.customDomain.remove","tags":["Agency domains"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.update","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agency/custom-domain/verify":{"post":{"operationId":"agency.customDomain.verify","tags":["Agency domains"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.update","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/agency-branding":{"get":{"operationId":"public.agencyBranding.get","tags":["Agency domains"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"public","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"label":{"type":"string","enum":["grey","white"]},"logoUrl":{"type":["string","null"]},"accent":{"type":["string","null"]}},"required":["displayName","label","logoUrl","accent"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants":{"get":{"operationId":"admin.tenants.list","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["platform","agency","client","direct"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","enum":["active","pending_approval","suspended","banned","deleted"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agencyId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"createdAfter","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"planCode","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}":{"get":{"operationId":"admin.tenants.get","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"admin.tenants.update","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"timezone":{"type":"string","maxLength":100},"locale":{"type":"string","maxLength":50},"country":{"type":["string","null"],"maxLength":100},"industry":{"type":["string","null"],"maxLength":100},"excludeFromMetrics":{"type":"boolean"},"phoneService":{"type":"string","enum":["deny","restore"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"admin.tenants.delete","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.data.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/suspend":{"post":{"operationId":"admin.tenants.suspend","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.suspend","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["suspended","banned"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/reinstate":{"post":{"operationId":"admin.tenants.reinstate","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.suspend","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/approve":{"post":{"operationId":"admin.tenants.approve","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/users":{"get":{"operationId":"admin.users.list","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"banned","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"needsRecovery","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/users/{userId}":{"get":{"operationId":"admin.users.get","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"admin.users.delete","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.data.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/users/{userId}/ban":{"post":{"operationId":"admin.users.ban","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.ban","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"banned":{"type":"boolean"},"banReason":{"type":"string","maxLength":1000}},"required":["banned"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/staff":{"get":{"operationId":"admin.staff.list","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.staff.manage","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":3650},"required":false,"name":"staleDays","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/staff/{userId}":{"put":{"operationId":"admin.staff.set","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.staff.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["staff_support","staff_admin"]}},"required":["role"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"admin.staff.revoke","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.staff.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/banned-emails":{"get":{"operationId":"admin.bannedEmails.list","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.ban","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"admin.bannedEmails.create","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.ban","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"reason":{"type":"string","maxLength":1000}},"required":["email"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/banned-emails/{email}":{"delete":{"operationId":"admin.bannedEmails.delete","tags":["Staff administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.ban","parameters":[{"schema":{"type":"string","format":"email"},"required":true,"name":"email","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/knowledge-definition-imports":{"post":{"operationId":"admin.knowledgeDefinitions.import","tags":["Staff definition imports"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"definition":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"sources":{"type":"array","items":{"$ref":"#/components/schemas/CreateKnowledgeSource"},"maxItems":25,"default":[]}},"required":["name"],"additionalProperties":false}},"required":["version","definition"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"pendingSourceIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}}},"required":["id","tenantId","pendingSourceIds"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/agent-definition-imports":{"post":{"operationId":"admin.agentDefinitions.import","tags":["Staff definition imports"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"name":{"type":"string","minLength":1,"maxLength":200},"definition":{"type":"object","properties":{"agent":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":2000},"instructions":{"type":"string","maxLength":100000},"language":{"type":"string","minLength":2,"maxLength":16},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"keyPhrases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":200},"modelTier":{"type":"string","enum":["speedy","brainy"]},"speechEngine":{"type":"string","enum":["omega","beta"]},"voiceId":{"type":["string","null"],"maxLength":200},"omegaThinkingLevel":{"type":["string","null"],"minLength":1,"maxLength":32},"initialMessage":{"type":["string","null"],"maxLength":2000},"skipRecordingNotice":{"type":"boolean"},"autoDeleteTranscripts":{"type":"boolean"},"callTimeoutSeconds":{"type":["integer","null"],"minimum":30,"maximum":14400},"testPhoneNumber":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{6,14}$"},"config":{"$ref":"#/components/schemas/AgentConfig"},"voiceConfig":{"type":"object","additionalProperties":{}}},"additionalProperties":false},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":["string","null"],"maxLength":20000},"config":{"type":"object","additionalProperties":{}},"channels":{"type":"array","items":{"type":"string","enum":["phone","chat","sms"]}},"enabled":{"type":"boolean"}},"required":["type","name","config"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["agent"],"additionalProperties":false},"knowledgeBases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"sources":{"type":"array","items":{"$ref":"#/components/schemas/CreateKnowledgeSource"},"maxItems":25,"default":[]}},"required":["name"],"additionalProperties":false},"maxItems":10,"default":[]}},"required":["version","name","definition"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"pendingSourceIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}}},"required":["id","tenantId","pendingSourceIds"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/users/{userId}/recovery-email":{"post":{"operationId":"admin.users.attachRecoveryEmail","tags":["Account recovery"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.recover","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"email":{"type":"string","maxLength":320,"format":"email"},"verificationNoteId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"ownershipVerified":{"type":"boolean","enum":[true]}},"required":["ticketId","email","verificationNoteId","ownershipVerified"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"attached":{"type":"boolean"},"recoveryComplete":{"type":"boolean"}},"required":["attached","recoveryComplete"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/users/{userId}/impersonate":{"post":{"operationId":"admin.users.impersonate","tags":["Staff impersonation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.user.impersonate","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minutes":{"type":"integer","minimum":1,"maximum":60,"default":15}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"sessionUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["sessionUrl","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/announcement-drafts":{"post":{"operationId":"admin.announcementDrafts.create","tags":["Staff announcement preparation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["outage","resolved"]},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":20000},"tenantIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":100}},"required":["kind","subject","body","tenantIds"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"admin.announcementDrafts.list","tags":["Staff announcement preparation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/announcement-drafts/{id}":{"get":{"operationId":"admin.announcementDrafts.get","tags":["Staff announcement preparation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/announcement-drafts/{id}/cancel":{"post":{"operationId":"admin.announcementDrafts.cancel","tags":["Staff announcement preparation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/announcement-drafts/{id}/preview":{"post":{"operationId":"admin.announcementDrafts.preview","tags":["Staff announcement preparation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/announcements/{id}/outbox":{"get":{"operationId":"admin.announcements.outbox","tags":["Staff announcement preparation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/phone-numbers/audit":{"post":{"operationId":"admin.numbers.audit","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/reconciliation-runs":{"post":{"operationId":"admin.reconciliation.run","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"string","enum":["billing","numbers","stripe_events"]},"minItems":1,"maxItems":3},"since":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["checks"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/reports/team-insights":{"get":{"operationId":"admin.reports.teamInsights","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.report.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["csv","json"],"default":"csv"},"required":false,"name":"format","in":"query"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/announcements":{"post":{"operationId":"admin.announcements.send","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["outage","resolved"]},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":20000},"tenantIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":10000},"all":{"type":"boolean"}},"required":["kind","subject","body"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/reports/customer-journey":{"get":{"operationId":"admin.reports.journey","tags":["Staff background operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.report.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/plans":{"get":{"operationId":"admin.plans.list","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","parameters":[{"schema":{"type":"string","enum":["base","bundle","minutes","agency","number","custom","legacy","addon"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","enum":["draft","active","grandfathered","retired"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"admin.plans.create","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["base","bundle","minutes","agency","number","custom","legacy","addon"]},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"public":{"type":"boolean","default":false}},"required":["code","name","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/plans/{planId}/versions":{"post":{"operationId":"admin.planVersions.create","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"planId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stripePrices":{"type":"object","additionalProperties":{"type":"string","minLength":1}},"monthlyAllowanceMc":{"type":"integer","minimum":0},"smsFreeParts":{"type":"integer","minimum":0,"default":0},"rates":{"type":"object","properties":{"schema":{"type":"number","enum":[2]},"roundUpToMc":{"type":"integer","exclusiveMinimum":0},"call":{"type":"object","properties":{"perMinuteMc":{"type":"integer","minimum":0},"outboundPerMinuteMc":{"type":"integer","exclusiveMinimum":0},"stepSeconds":{"type":"integer","exclusiveMinimum":0},"transferShareBps":{"type":"integer","minimum":0,"maximum":10000},"tollFreeInboundPerMinuteMc":{"type":"integer","minimum":0}},"required":["perMinuteMc","outboundPerMinuteMc","stepSeconds","transferShareBps","tollFreeInboundPerMinuteMc"],"additionalProperties":false},"voicechat":{"type":"object","properties":{"perMinuteMc":{"type":"integer","minimum":0},"stepSeconds":{"type":"integer","exclusiveMinimum":0}},"required":["perMinuteMc","stepSeconds"],"additionalProperties":false},"chat":{"type":"object","properties":{"perResponseMc":{"type":"integer","minimum":0}},"required":["perResponseMc"],"additionalProperties":false},"sms":{"type":"object","properties":{"perPartMc":{"type":"integer","minimum":0},"minimumAtCarrierCost":{"type":"boolean"}},"required":["perPartMc","minimumAtCarrierCost"],"additionalProperties":false},"knowledgeSearch":{"type":"object","properties":{"perSearchMc":{"type":"integer","minimum":0}},"required":["perSearchMc"],"additionalProperties":false},"magicInstructions":{"type":"object","properties":{"perUseMc":{"type":"integer","minimum":0}},"required":["perUseMc"],"additionalProperties":false},"agentHealthCheck":{"type":"object","properties":{"perUseMc":{"type":"integer","minimum":0}},"required":["perUseMc"],"additionalProperties":false},"modelTokens":{"type":"object","properties":{"inputPerMillionMc":{"type":"integer","minimum":0},"outputPerMillionMc":{"type":"integer","minimum":0}},"required":["inputPerMillionMc","outputPerMillionMc"],"additionalProperties":false}},"required":["schema","roundUpToMc","call","voicechat","chat","sms","knowledgeSearch","magicInstructions","agentHealthCheck","modelTokens"],"additionalProperties":false},"features":{"type":"object","properties":{"advancedCallRouting":{"type":"boolean"},"scheduling":{"type":"boolean"},"magicContacts":{"type":"boolean"},"experimentalVoices":{"type":"boolean"},"naturalVoices":{"type":"boolean"},"webhooks":{"type":"boolean"},"zapierIntegration":{"type":"boolean"},"AIprompt":{"type":"boolean"},"inviteTeamMembers":{"type":"boolean"},"callSummary":{"type":"string","enum":["basic","advanced"]},"spamDetection":{"type":"string","enum":["basic","advanced"]},"referenceLimit":{"type":"integer","minimum":0},"scenarioLimit":{"type":"integer","minimum":0},"webpagesLimit":{"type":"integer","minimum":0},"documentsLimit":{"type":"integer","minimum":0},"maxAdditionalEmails":{"type":"integer","minimum":0},"v2Agents":{"type":"integer","minimum":0},"agents":{"type":"integer","minimum":0},"knowledgeItems":{"type":"integer","minimum":0},"includedPhoneNumbers":{"type":"integer","minimum":0},"agency":{"type":"boolean"},"agencyMaxClients":{"type":"integer","minimum":0},"outboundCampaigns":{"type":"boolean"},"trialDays":{"type":"integer","minimum":0},"allowAchPayments":{"type":"boolean"}},"additionalProperties":false},"agencyLabel":{"type":["string","null"],"enum":["grey","white",null]},"notes":{"type":["string","null"],"maxLength":5000}},"required":["stripePrices","monthlyAllowanceMc","rates","features"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/plan-versions/{versionId}/status":{"post":{"operationId":"admin.planVersions.setStatus","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"versionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active","grandfathered","retired"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/promo-codes":{"get":{"operationId":"admin.promoCodes.list","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"admin.promoCodes.create","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"creditsMc":{"type":"integer","minimum":0,"exclusiveMinimum":0},"maxRedemptions":{"type":["integer","null"],"exclusiveMinimum":0},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["code","creditsMc"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/promo-codes/{promoCodeId}":{"patch":{"operationId":"admin.promoCodes.update","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.plan.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"promoCodeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"maxRedemptions":{"type":["integer","null"],"exclusiveMinimum":0},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/entitlements/{feature}":{"put":{"operationId":"admin.entitlements.set","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"feature","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0},{"type":"string"}]},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["value"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"admin.entitlements.clear","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"feature","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/stripe-sync":{"post":{"operationId":"admin.billing.syncStripe","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/credit-adjustments":{"post":{"operationId":"admin.billing.adjust","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountMc":{"type":"integer"},"bucket":{"type":"string","enum":["plan","promo","purchased"]},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"description":{"type":"string","maxLength":1000}},"required":["amountMc","bucket"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/subscription":{"put":{"operationId":"admin.billing.setSubscription","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planVersionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["trialing","active","past_due","paused","canceled","incomplete","unpaid"]},"currentPeriodStart":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"currentPeriodEnd":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"pauseReason":{"type":["string","null"],"maxLength":1000},"billedOutsideStripe":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/gate-exemptions":{"get":{"operationId":"admin.billing.listGateExemptions","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GateExemption"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"admin.billing.setGateExemption","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"until":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["until"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GateExemption"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/gate-exemptions/{exemptionId}":{"delete":{"operationId":"admin.billing.clearGateExemption","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"exemptionId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/extra-numbers":{"get":{"operationId":"admin.billing.listExtraNumbers","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtraNumbers"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/billing/extra-numbers":{"get":{"operationId":"admin.billing.listTeamsWithExtraNumbers","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExtraNumbers"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/number-holds":{"put":{"operationId":"admin.billing.holdNumber","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumberId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["phoneNumberId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberHold"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/number-holds/{holdId}":{"delete":{"operationId":"admin.billing.clearNumberHold","tags":["Staff billing administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"holdId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/catalog/industries":{"get":{"operationId":"admin.catalog.industries.list","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/catalog/industries/{industryId}":{"put":{"operationId":"admin.catalog.industries.set","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"industryId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":200},"regulated":{"type":"boolean","default":false},"data":{"type":"object","additionalProperties":{},"default":{}}},"required":["slug","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/catalog/templates/{templateId}":{"put":{"operationId":"admin.catalog.templates.set","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"templateId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"industryId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"category":{"type":["string","null"],"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"definition":{"$ref":"#/components/schemas/AgentDefinition"},"published":{"type":"boolean","default":true}},"required":["name","definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"admin.catalog.templates.delete","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"templateId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/catalog/prompts/{promptId}":{"put":{"operationId":"admin.catalog.prompts.set","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"promptId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":200000},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20,"default":[]}},"required":["title","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/demo-agents":{"get":{"operationId":"admin.demoAgents.list","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/demo-agents/{agentId}":{"put":{"operationId":"admin.demoAgents.set","tags":["Staff catalogue administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"maxSeconds":{"type":"integer","minimum":30,"maximum":900},"label":{"type":"string","maxLength":200}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/conversations":{"get":{"operationId":"admin.conversations.list","tags":["Staff support review"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.conversation.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"callControlId","in":"query"},{"schema":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":30},"required":false,"name":"e164","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["telnyx","twilio","jambonz"]},"required":false,"name":"carrier","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["grey","white"]},"required":false,"name":"label","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/sms-messages":{"get":{"operationId":"admin.sms.list","tags":["Staff support review"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.conversation.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"callControlId","in":"query"},{"schema":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":30},"required":false,"name":"e164","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["telnyx","twilio","jambonz"]},"required":false,"name":"carrier","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["grey","white"]},"required":false,"name":"label","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/workflow-executions":{"get":{"operationId":"admin.workflowExecutions.list","tags":["Staff support review"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.conversation.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"callControlId","in":"query"},{"schema":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":30},"required":false,"name":"e164","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["telnyx","twilio","jambonz"]},"required":false,"name":"carrier","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["grey","white"]},"required":false,"name":"label","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/phone-numbers":{"get":{"operationId":"admin.numbers.list","tags":["Staff support review"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"callControlId","in":"query"},{"schema":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":30},"required":false,"name":"e164","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["telnyx","twilio","jambonz"]},"required":false,"name":"carrier","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["grey","white"]},"required":false,"name":"label","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/agencies":{"get":{"operationId":"admin.agencies.list","tags":["Staff support review"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"callControlId","in":"query"},{"schema":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":30},"required":false,"name":"e164","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["telnyx","twilio","jambonz"]},"required":false,"name":"carrier","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["grey","white"]},"required":false,"name":"label","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/reports/margins":{"get":{"operationId":"admin.reports.margins","tags":["Staff support review"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.report.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["tenant","model","kind"],"default":"tenant"},"required":false,"name":"groupBy","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tenants/{tenantId}/referrals/{attributionId}/reward":{"post":{"operationId":"admin.referrals.reward","tags":["Staff referrals"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.billing.adjust","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"attributionId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/phone-numbers/{phoneNumberId}":{"patch":{"operationId":"admin.numbers.update","tags":["Staff telephony administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"phoneNumberId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"status":{"type":"string","enum":["reserved","pending","active","porting","released","failed"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/port-requests/{portRequestId}":{"patch":{"operationId":"admin.portRequests.update","tags":["Staff telephony administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"portRequestId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","minLength":1,"maxLength":100},"focDate":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"},"carrierOrderId":{"type":["string","null"],"maxLength":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/ten-dlc/{tenantId}":{"patch":{"operationId":"admin.tenDlc.update","tags":["Staff telephony administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandStatus":{"type":["string","null"],"maxLength":100},"campaignStatus":{"type":["string","null"],"maxLength":100},"lastError":{"type":["string","null"],"maxLength":2000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/phone-numbers/{phoneNumberId}/moves":{"post":{"operationId":"admin.numberMoves.create","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"phoneNumberId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["tenantId","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberMove"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/number-moves":{"get":{"operationId":"admin.numberMoves.list","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","enum":["awaiting_acceptance","executing","finalizing","completed","declined","expired","canceled","failed"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NumberMove"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/number-moves/{moveId}/retry":{"post":{"operationId":"admin.numberMoves.retry","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"moveId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberMove"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/number-moves/{moveId}/cancel":{"post":{"operationId":"admin.numberMoves.cancel","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"moveId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberMove"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/number-moves":{"get":{"operationId":"numberMoves.list","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"string","enum":["awaiting_acceptance","executing","finalizing","completed","declined","expired","canceled","failed"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/NumberMove"},{"type":"object","properties":{"canAccept":{"type":"boolean"}},"required":["canAccept"]}]}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/number-moves/{moveId}/accept":{"post":{"operationId":"numberMoves.accept","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"moveId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberMove"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/number-moves/{moveId}/decline":{"post":{"operationId":"numberMoves.decline","tags":["Number moves"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"moveId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberMove"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/jobs":{"get":{"operationId":"admin.jobs.list","tags":["Staff job administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.job.manage","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["data","workflow","campaign","scheduled_call","ingest","telephony","post_call"]},"required":false,"name":"workflow","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/jobs/{instanceId}/retry":{"post":{"operationId":"admin.jobs.retry","tags":["Staff job administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.job.manage","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"},"required":true,"name":"instanceId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/jobs/{instanceId}/terminate":{"post":{"operationId":"admin.jobs.terminate","tags":["Staff job administration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.job.manage","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"},"required":true,"name":"instanceId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/knowledge-migrations":{"post":{"operationId":"admin.knowledge.reembed","tags":["Staff knowledge migration"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.catalog.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"knowledgeBaseIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":100},"all":{"type":"boolean"},"model":{"type":"string","minLength":1,"maxLength":200}},"required":["model"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/agencies/{tenantId}":{"patch":{"operationId":"admin.agencies.update","tags":["Staff settings and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.tenant.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","enum":["grey","white"]},"waitlistEnabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/email-suppressions":{"get":{"operationId":"admin.emailSuppressions.list","tags":["Staff settings and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"email"},"required":false,"name":"email","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/email-suppressions/{email}":{"delete":{"operationId":"admin.emailSuppressions.delete","tags":["Staff settings and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.email.send","parameters":[{"schema":{"type":"string","format":"email"},"required":true,"name":"email","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/audit-events":{"get":{"operationId":"admin.auditEvents.list","tags":["Staff settings and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.audit.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"type":"string","maxLength":2000},"required":false,"name":"action","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"actorId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/flags":{"get":{"operationId":"admin.flags.list","tags":["Staff settings and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.flag.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/flags/{flagKey}":{"put":{"operationId":"admin.flags.set","tags":["Staff settings and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.flag.manage","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.:-]{0,99}$"},"required":true,"name":"flagKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-bases":{"get":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeBases.list","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"}],"responses":{"200":{"description":"Knowledge bases","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBase"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeBases.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"agentIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":100}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-bases/{knowledgeBaseId}":{"get":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeBases.get","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"},{"schema":{"type":"string","enum":["agents"]},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"Knowledge base","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeBases.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeBases.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-bases/{knowledgeBaseId}/search":{"post":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeBases.search","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000},"limit":{"type":"integer","minimum":1,"maximum":50},"threshold":{"type":"number","minimum":0,"maximum":1}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Search results (1 credit)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"meta":{"type":"object","additionalProperties":{}}},"required":["data","meta"]}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-bases/{knowledgeBaseId}/sources":{"get":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeSources.list","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["qa","webpage","site_crawl","document"]},{"type":"array","items":{"type":"string","enum":["qa","webpage","site_crawl","document"]}}]},"required":false,"name":"kind","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["pending","processing","ready","failed"]},{"type":"array","items":{"type":"string","enum":["pending","processing","ready","failed"]}}]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["name","-createdAt","-lastIngestedAt"]},"required":false,"name":"sort","in":"query"}],"responses":{"200":{"description":"Sources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSource"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeSources.create","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeSource"}}}},"responses":{"201":{"description":"Source processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-sources/{sourceId}":{"get":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeSources.get","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"}],"responses":{"200":{"description":"Source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeSources.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKnowledgeSource"}}}},"responses":{"200":{"description":"Updated source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeSources.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-bases/{knowledgeBaseId}/sources/bulk-delete":{"post":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeSources.bulkDelete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"knowledgeBaseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":500}},"required":["sourceIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Deleted count","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-sources/{sourceId}/refresh":{"post":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeSources.refresh","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"}],"responses":{"200":{"description":"Refreshing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-sources/{sourceId}/chunks":{"get":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeSources.chunks.list","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"versionId","in":"query"}],"responses":{"200":{"description":"Chunks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeChunk"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-sources/{sourceId}/versions":{"get":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","operationId":"knowledgeSources.versions.list","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"}],"responses":{"200":{"description":"Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSourceVersion"}}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/knowledge-sources/{sourceId}/versions/{versionId}/publish":{"post":{"tags":["Knowledge"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.update","operationId":"knowledgeSources.versions.publish","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sourceId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Published source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSource"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/knowledge-bases":{"put":{"operationId":"agents.knowledgeBases.set","tags":["Agents"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"knowledgeBaseIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":100}},"required":["knowledgeBaseIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Updated agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/knowledge/search":{"post":{"operationId":"agents.knowledge.search","tags":["Agents"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"knowledge.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000},"limit":{"type":"integer","minimum":1,"maximum":50},"threshold":{"type":"number","minimum":0,"maximum":1}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Search linked knowledge (1 credit)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"meta":{"type":"object","additionalProperties":{}}},"required":["data","meta"]}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tenants":{"post":{"operationId":"tenants.create","x-echowin-permission":"self","tags":["Tenants and members"],"summary":"Create another direct team owned by the user","description":"Creates a direct team with the signed-in user as its owner, on the same terms as a team saved at signup: same starting checklist, country taken from the request's edge location (which decides phone service, D106; chat works everywhere), no signup bonus. It does not switch the session; call `POST /sessions/active-tenant` to act on it. API keys cannot create teams.","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenant"}}}},"responses":{"201":{"description":"The new team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"tenants.list","x-echowin-permission":"self","tags":["Tenants"],"summary":"Tenants the caller can reach (the tenant switcher)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of tenants","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReachableTenant"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tenants/{tenantId}":{"get":{"operationId":"tenants.get","x-echowin-permission":"tenant.read","tags":["Tenants"],"summary":"Get a tenant","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"The tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"tenants.update","x-echowin-permission":"tenant.update","tags":["Tenants"],"summary":"Rename a tenant or change its team-wide settings","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenant"}}}},"responses":{"200":{"description":"The updated tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"tenants.delete","tags":["Tenants and members"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmDeletion"}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeletion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/clients/{clientId}":{"delete":{"operationId":"clients.delete","tags":["Tenants and members"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"client.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"clientId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmDeletion"}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeletion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"clients.get","x-echowin-permission":"client.read","tags":["Agencies and clients"],"summary":"Get a client","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"clientId","in":"path"}],"responses":{"200":{"description":"The client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"clients.update","x-echowin-permission":"client.update","tags":["Agencies and clients"],"summary":"Change a client's name, access, allocation, billing mode or status","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"clientId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClient"}}}},"responses":{"200":{"description":"The client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tenants/{tenantId}/restore":{"post":{"operationId":"tenants.restore","tags":["Tenants and members"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeletion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/sessions/active-tenant":{"post":{"operationId":"sessions.activeTenant.set","x-echowin-permission":"self","tags":["Identity"],"summary":"Switch the session's active tenant","description":"Sets the tenant the portal acts on for this session (the tenant switcher). The caller must reach the tenant. Sessions only; API keys name the tenant per request with `X-Tenant-Id`.","security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveTenant"}}}},"responses":{"200":{"description":"The active tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveTenant"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/sessions":{"get":{"operationId":"sessions.list","x-echowin-permission":"self","tags":["Identity"],"summary":"Signed-in sessions of the user","description":"The user's live sessions, newest first, from Better Auth's session store. Tokens are never returned; revoke a session by its id.","security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"Sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionPage"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/sessions/{sessionId}":{"delete":{"operationId":"sessions.revoke","x-echowin-permission":"self","tags":["Identity"],"summary":"Sign out one session","description":"Ends one of the user's sessions through Better Auth (its session hooks also end OAuth grants tied to a staff impersonation session). Revoking the current session signs this browser out.","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"}],"responses":{"204":{"description":"Signed out"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/members":{"get":{"operationId":"members.list","x-echowin-permission":"member.read","tags":["Members"],"summary":"Members of the acting tenant","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["owner","admin","member","viewer","staff_admin","staff_support"]},"required":false,"name":"role","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Name or email contains"},"required":false,"description":"Name or email contains","name":"q","in":"query"}],"responses":{"200":{"description":"A page of members","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/members/{memberId}":{"get":{"operationId":"members.get","x-echowin-permission":"member.read","tags":["Members"],"summary":"Get a member","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"memberId","in":"path"}],"responses":{"200":{"description":"The member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"members.update","x-echowin-permission":"member.update","tags":["Members"],"summary":"Change a member's role, client assignments or notifications","description":"Only an owner can grant or remove the owner role, and a tenant always keeps one owner. `clientTenantIds` replaces the agency member's client assignments.","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"memberId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMember"}}}},"responses":{"200":{"description":"The member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"members.remove","x-echowin-permission":"member.remove","tags":["Members"],"summary":"Remove a member","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"memberId","in":"path"}],"responses":{"204":{"description":"Removed"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invitations":{"get":{"operationId":"invitations.list","x-echowin-permission":"member.read","tags":["Members"],"summary":"Invitations of the acting tenant","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["pending","accepted","revoked","expired"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"A page of invitations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"invitations.create","x-echowin-permission":"member.invite","tags":["Members"],"summary":"Invite someone by email","description":"Sends an invitation email with a one-time link (valid 7 days). Agency invitations may name the clients the new member is assigned to.","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitation"}}}},"responses":{"201":{"description":"The invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invitations/{invitationId}/resend":{"post":{"operationId":"invitations.resend","x-echowin-permission":"member.invite","tags":["Members"],"summary":"Send the invitation again with a new link","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"invitationId","in":"path"}],"responses":{"200":{"description":"The invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invitations/{invitationId}":{"delete":{"operationId":"invitations.revoke","x-echowin-permission":"member.invite","tags":["Members"],"summary":"Revoke a pending invitation","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"invitationId","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/invitations/{token}":{"get":{"operationId":"invitations.lookup","x-echowin-permission":"public","tags":["Members"],"summary":"What an invitation link is for (before signing in)","security":[],"parameters":[{"schema":{"type":"string","minLength":20,"maxLength":128},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"The invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationPreview"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invitations/accept":{"post":{"operationId":"invitations.accept","x-echowin-permission":"self","tags":["Members"],"summary":"Accept an invitation as the signed-in user","description":"The invitation must be addressed to the signed-in user's email, from an account of the invited workspace's realm (a white-label agency's clients have accounts on its domain). Creates the membership with the invited role and client assignments.","security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitation"}}}},"responses":{"200":{"description":"The new membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/me/invitations":{"get":{"operationId":"me.invitations.list","x-echowin-permission":"self","tags":["Identity"],"summary":"Pending invitations to the signed-in user's email that this account can accept","security":[{"session":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of invitations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agency":{"get":{"operationId":"agency.get","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyProfile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"agency.update","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":200},"logoUploadId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"theme":{"type":["object","null"],"properties":{"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["accentColor"],"additionalProperties":false},"senderName":{"type":["string","null"],"minLength":1,"maxLength":200},"supportEmail":{"type":["string","null"],"format":"email"},"defaultClientAccess":{"type":"object","properties":{"users":{"type":"boolean"},"instructions":{"type":"boolean"},"instructionsWrite":{"type":"boolean"},"testing":{"type":"boolean"},"knowledgeBase":{"type":"boolean"},"agentConfiguration":{"type":"boolean"},"agentCreation":{"type":"boolean"}},"additionalProperties":false},"waitlistEnabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyProfile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agency/logo/{uploadId}":{"get":{"operationId":"agency.logo.get","tags":["Agencies"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"uploadId","in":"path"}],"responses":{"302":{"description":"Authorized private logo download","headers":{"location":{"schema":{"type":"string","format":"uri"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/generate":{"post":{"operationId":"agents.generate","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"websiteUrl":{"type":"string","maxLength":2048,"format":"uri"},"businessDetails":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":10000},"address":{"type":"string","maxLength":1000},"hours":{"type":"string","maxLength":1000}},"required":["name","description"],"additionalProperties":false},"templateId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"language":{"type":"string","minLength":2,"maxLength":16,"default":"en"},"name":{"type":"string","minLength":1,"maxLength":200,"description":"The agent's name. Kept after setup; omitted, setup names the agent."},"timezone":{"type":"string","minLength":1,"maxLength":64,"example":"America/New_York"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/setup":{"get":{"operationId":"agents.setup.get","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSetup"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/setup/retry":{"post":{"operationId":"agents.setup.retry","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSetup"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/instructions/generate":{"post":{"operationId":"agents.instructions.generate","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":20000},"mode":{"type":"string","enum":["write","improve"],"default":"write"}},"required":["description"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string","minLength":1,"maxLength":100000}},"required":["instructions"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/tool-suggestions":{"post":{"operationId":"agents.toolSuggestions.create","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["type","name","reason"],"additionalProperties":false},"maxItems":20}},"required":["suggestions"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/voices":{"get":{"operationId":"voices.list","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","enum":["omega","beta"]},"required":false,"name":"speechEngine","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":16},"required":false,"name":"language","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"speechEngine":{"type":"string","enum":["omega","beta"]},"gender":{"type":["string","null"]},"languages":{"type":"array","items":{"type":"string"}},"preview":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"status":{"type":"string","enum":["approved","unavailable"]},"url":{"type":["string","null"]}},"required":["version","status","url"]}},"required":["id","name","speechEngine","gender","languages","preview"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agent-tools/{toolId}/test":{"post":{"operationId":"agentTools.test","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"toolId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"variables":{"type":"object","additionalProperties":{"type":"string","maxLength":4000},"default":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object","additionalProperties":{}},"response":{"type":"object","additionalProperties":{}},"durationMs":{"type":"integer","minimum":0}},"required":["request","response","durationMs"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/test-chats":{"post":{"operationId":"testChats.create","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"channel":{"type":"string","enum":["playground_chat"]},"status":{"type":"string","enum":["active"]},"isTest":{"type":"boolean","enum":[true]},"startedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","tenantId","agentId","channel","status","isTest","startedAt","metadata"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/test-messages":{"post":{"operationId":"testChats.send","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":20000}},"required":["content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"conversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"seq":{"type":"integer"},"role":{"type":"string","enum":["caller","agent"]},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","conversationId","seq","role","content","createdAt"]}}},"required":["messages"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/test-cases":{"get":{"operationId":"agentTestCases.list","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["role","content"],"additionalProperties":false},"minItems":1,"maxItems":30},"expected":{"type":"string","minLength":1,"maxLength":10000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["name","turns","expected","id","tenantId","agentId","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"agentTestCases.create","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["role","content"],"additionalProperties":false},"minItems":1,"maxItems":30},"expected":{"type":"string","minLength":1,"maxLength":10000}},"required":["name","turns","expected"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"turns":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["role","content"],"additionalProperties":false},"minItems":1,"maxItems":30},"expected":{"type":"string","minLength":1,"maxLength":10000},"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["name","turns","expected","id","tenantId","agentId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/test-runs":{"post":{"operationId":"agentTestCases.run","tags":["Agent operations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"testCaseIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":20}},"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestRun"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agency/enroll":{"post":{"operationId":"agency.enroll","tags":["Agency enrollment"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyProfile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents":{"get":{"operationId":"agents.list","x-echowin-permission":"agent.read","tags":["Agents"],"summary":"Agents of the acting tenant","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Name contains"},"required":false,"description":"Name contains","name":"q","in":"query"},{"schema":{"type":"string","enum":["omega","beta"]},"required":false,"name":"speechEngine","in":"query"},{"schema":{"$ref":"#/components/schemas/AgentStatus"},"required":false,"description":"Derived; see agentStatus in apps/api/src/lib/agents.ts","name":"status","in":"query"},{"schema":{"type":"string","enum":["-createdAt","name","-lastConversationAt"],"default":"-createdAt","description":"`-lastConversationAt` puts agents without real conversations last"},"required":false,"description":"`-lastConversationAt` puts agents without real conversations last","name":"sort","in":"query"}],"responses":{"200":{"description":"A page of agents with their activity, and per-status counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"agents.create","x-echowin-permission":"agent.create","tags":["Agents"],"summary":"Create an agent, blank or from a template","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgent"}}}},"responses":{"201":{"description":"The agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}":{"get":{"operationId":"agents.get","x-echowin-permission":"agent.read","tags":["Agents"],"summary":"Get an agent","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"The agent (ETag header for If-Match)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"agents.update","x-echowin-permission":"agent.update","tags":["Agents"],"summary":"Update an agent","description":"Changing `instructions` also records an instruction version. Send `If-Match` with the ETag from a read to avoid overwriting someone else's change.","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgent"}}}},"responses":{"200":{"description":"The agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"agents.delete","x-echowin-permission":"agent.delete","tags":["Agents"],"summary":"Delete an agent","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/copy":{"post":{"operationId":"agents.copy","x-echowin-permission":"agent.create","tags":["Agents"],"summary":"Copy an agent with its tools (in the same tenant)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyAgent"}}}},"responses":{"201":{"description":"The copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/instructions":{"get":{"operationId":"agents.instructions.get","x-echowin-permission":"agent.read","tags":["Agents"],"summary":"An agent's current instructions","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"The instructions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInstructions"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"agents.instructions.set","x-echowin-permission":"agent.update","tags":["Agents"],"summary":"Replace an agent's instructions (records a version)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInstructions"}}}},"responses":{"200":{"description":"The instructions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInstructions"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/instruction-versions":{"get":{"operationId":"agents.instructionVersions.list","x-echowin-permission":"agent.read","tags":["Agents"],"summary":"Instruction history, newest first","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of versions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InstructionVersion"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/instruction-versions/{versionId}/restore":{"post":{"operationId":"agents.instructionVersions.restore","x-echowin-permission":"agent.update","tags":["Agents"],"summary":"Restore an earlier version (recorded as a new version)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"versionId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"responses":{"200":{"description":"The instructions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInstructions"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/health-checks":{"get":{"operationId":"agents.healthChecks.list","x-echowin-permission":"agent.read","tags":["Agents"],"summary":"Health checks of an agent, newest first","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of health checks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HealthCheck"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"agents.healthChecks.run","x-echowin-permission":"agent.read","tags":["Agents"],"summary":"Review the agent's setup and suggest fixes","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"responses":{"201":{"description":"The health check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheck"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/health-checks/{checkId}/apply":{"post":{"operationId":"agents.healthChecks.apply","x-echowin-permission":"agent.update","tags":["Agents"],"summary":"Apply suggested fixes from a health check","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"checkId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyFixes"}}}},"responses":{"200":{"description":"The agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/prompt-optimization":{"get":{"operationId":"agents.promptOptimization.get","tags":["Prompt optimization"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"etag":{"type":"string"},"revision":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"sourceVersionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"originalInstructions":{"type":"string"},"draftInstructions":{"type":["string","null"]},"enabled":{"type":"boolean"},"cost":{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]},"microUsd":{"type":"null"}},"required":["status","microUsd"]}},"required":["agentId","etag","revision","sourceVersionId","originalInstructions","draftInstructions","enabled","cost"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"agents.promptOptimization.draft","tags":["Prompt optimization"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string","minLength":1,"maxLength":100000},"sourceVersionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["instructions","sourceVersionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"etag":{"type":"string"},"revision":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"sourceVersionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"originalInstructions":{"type":"string"},"draftInstructions":{"type":["string","null"]},"enabled":{"type":"boolean"},"cost":{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]},"microUsd":{"type":"null"}},"required":["status","microUsd"]}},"required":["agentId","etag","revision","sourceVersionId","originalInstructions","draftInstructions","enabled","cost"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"agents.promptOptimization.select","tags":["Prompt optimization"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"action":{"type":"string","enum":["apply","disable","discard"]}},"required":["revision","action"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"etag":{"type":"string"},"revision":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"sourceVersionId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"originalInstructions":{"type":"string"},"draftInstructions":{"type":["string","null"]},"enabled":{"type":"boolean"},"cost":{"type":"object","properties":{"status":{"type":"string","enum":["unknown"]},"microUsd":{"type":"null"}},"required":["status","microUsd"]}},"required":["agentId","etag","revision","sourceVersionId","originalInstructions","draftInstructions","enabled","cost"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts":{"get":{"operationId":"contacts.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["-createdAt","createdAt","-updatedAt","updatedAt","firstName","-firstName","lastName","-lastName","email","-email","e164","-e164"],"default":"-createdAt"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tagId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"listId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"assignedUserId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"ownerUserId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"doNotCall","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"favorite","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"createdAfter","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"createdBefore","in":"query"},{"schema":{"type":"string"},"required":false,"name":"expand","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeTotal","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contacts.create","x-echowin-permission":"contact.create","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":["string","null"],"maxLength":1000},"lastName":{"type":["string","null"],"maxLength":1000},"e164":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{6,14}$"},"email":{"type":["string","null"],"maxLength":320,"format":"email"},"company":{"type":["string","null"],"maxLength":1000},"customFields":{"type":"object","additionalProperties":{}},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"],"maxLength":1000},"line2":{"type":["string","null"],"maxLength":1000},"city":{"type":["string","null"],"maxLength":1000},"region":{"type":["string","null"],"maxLength":1000},"postalCode":{"type":["string","null"],"maxLength":1000},"country":{"type":["string","null"],"maxLength":1000}},"additionalProperties":false},"tagIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"tagNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":100},"listIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"assignUserIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"note":{"type":"string","minLength":1,"maxLength":100000}},"additionalProperties":false}}}},"responses":{"201":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}":{"get":{"operationId":"contacts.get","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"contacts.update","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":["string","null"],"maxLength":1000},"lastName":{"type":["string","null"],"maxLength":1000},"e164":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{6,14}$"},"email":{"type":["string","null"],"maxLength":320,"format":"email"},"company":{"type":["string","null"],"maxLength":1000},"customFields":{"type":"object","additionalProperties":{}},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"],"maxLength":1000},"line2":{"type":["string","null"],"maxLength":1000},"city":{"type":["string","null"],"maxLength":1000},"region":{"type":["string","null"],"maxLength":1000},"postalCode":{"type":["string","null"],"maxLength":1000},"country":{"type":["string","null"],"maxLength":1000}},"additionalProperties":false},"doNotCall":{"type":"boolean"},"favorite":{"type":"boolean"},"ownerUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"memory":{"type":["string","null"],"maxLength":100000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"contacts.delete","x-echowin-permission":"contact.delete","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/bulk-update":{"post":{"operationId":"contacts.bulkUpdate","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":1000},"addTagIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"removeTagIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"addListIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"removeListIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000},"doNotCall":{"type":"boolean"},"ownerUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["contactIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"}},"required":["updated"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}/tags":{"put":{"operationId":"contacts.tags.set","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tagIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000,"default":[]},"tagNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":100,"default":[]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}/assignments":{"get":{"operationId":"contacts.assignments.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"contacts.assignments.set","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000}},"required":["userIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}/reveal":{"post":{"operationId":"contacts.reveal","x-echowin-permission":"sensitive.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100}},"required":["fields"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"customFields":{"type":"object","additionalProperties":{}}},"required":["customFields"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}/notes":{"get":{"operationId":"contactNotes.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactNote"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contactNotes.create","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":100000},"emailTo":{"type":"array","items":{"type":"string","format":"email"},"maxItems":20}},"required":["body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactNote"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-notes/{noteId}":{"patch":{"operationId":"contactNotes.update","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"noteId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":100000}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactNote"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"contactNotes.delete","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"noteId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-fields":{"get":{"operationId":"contactFields.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactFieldDefinition"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contactFields.create","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"required":{"type":"boolean"},"sensitive":{"type":"boolean"},"options":{"type":["array","null"],"items":{"type":"string","maxLength":200},"maxItems":100},"validation":{"type":["object","null"],"properties":{"min":{"type":"number"},"max":{"type":"number"},"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false},"placeholder":{"type":["string","null"],"maxLength":1000},"helpText":{"type":["string","null"],"maxLength":1000},"active":{"type":"boolean"},"hiddenByDefault":{"type":"boolean"},"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,99}$"},"type":{"type":"string","enum":["text","number","date","boolean","select","multiselect","email","phone","url"]}},"required":["label","name","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinition"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-fields/{fieldId}":{"patch":{"operationId":"contactFields.update","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"fieldId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"required":{"type":"boolean"},"sensitive":{"type":"boolean"},"options":{"type":["array","null"],"items":{"type":"string","maxLength":200},"maxItems":100},"validation":{"type":["object","null"],"properties":{"min":{"type":"number"},"max":{"type":"number"},"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false},"placeholder":{"type":["string","null"],"maxLength":1000},"helpText":{"type":["string","null"],"maxLength":1000},"active":{"type":"boolean"},"hiddenByDefault":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFieldDefinition"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"contactFields.delete","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"fieldId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-fields/order":{"put":{"operationId":"contactFields.reorder","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fieldIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000}},"required":["fieldIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactFieldDefinition"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-tags":{"get":{"operationId":"contactTags.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactTag"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contactTags.create","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"color":{"type":["string","null"],"pattern":"^#[0-9a-fA-F]{6}$"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTag"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-tags/{tagId}":{"patch":{"operationId":"contactTags.update","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tagId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"color":{"type":["string","null"],"pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTag"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"contactTags.delete","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"tagId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-lists":{"get":{"operationId":"contactLists.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactList"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contactLists.create","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":5000},"filters":{"$ref":"#/components/schemas/ContactListFilters"},"contactIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":1000}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-lists/{listId}":{"patch":{"operationId":"contactLists.update","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"listId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":5000},"filters":{"$ref":"#/components/schemas/ContactListFilters"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"contactLists.delete","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"listId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-lists/{listId}/members":{"get":{"operationId":"contactLists.members.list","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"listId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contactLists.members.add","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"listId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":1000}},"required":["contactIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-lists/{listId}/members/remove":{"post":{"operationId":"contactLists.members.remove","x-echowin-permission":"contact.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"listId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":1000}},"required":["contactIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-settings":{"get":{"operationId":"contactSettings.get","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"autoCreateFromConversations":{"type":"boolean"},"magicLookup":{"type":"boolean"}},"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"contactSettings.update","x-echowin-permission":"tenant.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"autoCreateFromConversations":{"type":"boolean"},"magicLookup":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"autoCreateFromConversations":{"type":"boolean"},"magicLookup":{"type":"boolean"}},"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}/timeline":{"get":{"operationId":"contacts.timeline","x-echowin-permission":"contact.read","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"types","in":"query"}],"responses":{"200":{"description":"Contact resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-buttons":{"get":{"operationId":"contactButtons.list","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactButton"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"contactButtons.create","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500},"type":{"type":"string","enum":["link","http","toggle"]},"config":{"type":"object","additionalProperties":{}},"icon":{"type":["string","null"],"maxLength":50},"color":{"type":["string","null"],"maxLength":50},"active":{"type":"boolean"}},"required":["name","type","config"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactButton"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-buttons/{buttonId}":{"patch":{"operationId":"contactButtons.update","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"buttonId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500},"type":{"type":"string","enum":["link","http","toggle"]},"config":{"type":"object","additionalProperties":{}},"icon":{"type":["string","null"],"maxLength":50},"color":{"type":["string","null"],"maxLength":50},"active":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactButton"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"contactButtons.delete","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"buttonId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/{contactId}/buttons/{buttonId}/run":{"post":{"operationId":"contactButtons.run","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"contactId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"buttonId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"type":{"type":"string","enum":["http","toggle"]},"ok":{"type":"boolean"},"status":{"type":["integer","null"]},"message":{"type":["string","null"]},"fieldName":{"type":"string"},"value":{"type":"boolean"}},"required":["type","ok","message"]}},"required":["result"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-imports/preview":{"post":{"operationId":"contactImports.preview","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["uploadId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"}},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"phone":{"type":"object","properties":{"countryCodeColumn":{"type":"string"}}},"sampleRows":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["columns","mapping","phone","sampleRows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-imports":{"post":{"operationId":"contactImports.create","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string","format":"uuid"},"mapping":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":200}},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"default":[]},"listId":{"type":"string","format":"uuid"},"dedupeBy":{"type":"string","enum":["e164","email","none"],"default":"none"},"phone":{"type":"object","properties":{"countryCodeColumn":{"type":"string","minLength":1,"maxLength":200},"defaultCountryCode":{"type":"string","pattern":"^[1-9]\\d{0,3}$"}},"additionalProperties":false},"campaignId":{"type":"string","format":"uuid"}},"required":["uploadId","mapping"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contact-imports/{jobId}":{"get":{"operationId":"contactImports.get","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/contacts/bulk-delete":{"post":{"operationId":"contacts.bulkDelete","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":1000},"filter":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"doNotCall":{"type":"boolean"},"favorite":{"type":"boolean"},"source":{"type":"string","maxLength":100},"ownerUserId":{"type":"string","format":"uuid"},"assignedUserId":{"type":"string","format":"uuid"},"tagIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100},"listId":{"type":"string","format":"uuid"},"createdAfter":{"type":"string","format":"date-time"},"createdBefore":{"type":"string","format":"date-time"}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/data-jobs/{jobId}":{"get":{"operationId":"dataJobs.get","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self+purpose","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/data-jobs/{jobId}/cancel":{"post":{"operationId":"dataJobs.cancel","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self+purpose","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/data-jobs/{jobId}/retry":{"post":{"operationId":"dataJobs.retry","tags":["Data jobs"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self+purpose","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations":{"get":{"operationId":"conversations.list","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","enum":["inbound","outbound"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","enum":["queued","ringing","active","ended","failed","no_answer","busy","canceled"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["true"]},"required":false,"name":"live","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"contactId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"phoneNumberId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"widgetId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"flagged","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"favorite","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"spam","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"isTest","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":2147483647},"required":false,"name":"minDurationMs","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":2147483647},"required":false,"name":"maxDurationMs","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"startedAfter","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"startedBefore","in":"query"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"tag","in":"query"},{"schema":{"type":"string","enum":["-startedAt","-durationMs","endedAt"],"default":"-startedAt"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}":{"get":{"operationId":"conversations.get","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"conversations.update","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"favorite":{"type":"boolean"},"flagged":{"type":"boolean"},"spam":{"type":"boolean"},"archived":{"type":"boolean"},"title":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"conversations.delete","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","enum":["content","all"],"default":"content"},"required":false,"name":"scope","in":"query"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/bulk-update":{"post":{"operationId":"conversations.bulkUpdate","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":500},"set":{"type":"object","properties":{"favorite":{"type":"boolean"},"flagged":{"type":"boolean"},"spam":{"type":"boolean"},"archived":{"type":"boolean"}},"additionalProperties":false}},"required":["conversationIds","set"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"}},"required":["updated"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/messages":{"get":{"operationId":"conversations.messages.list","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"role","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":["integer","null"],"minimum":-1,"maximum":2147483647},"required":false,"name":"afterSeq","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/notes":{"get":{"operationId":"conversationNotes.list","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationNote"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"conversationNotes.create","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":100000}},"required":["body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNote"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversation-notes/{noteId}":{"patch":{"operationId":"conversationNotes.update","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"noteId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":100000}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNote"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"conversationNotes.delete","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"noteId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/feedback":{"put":{"operationId":"conversationFeedback.set","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"string","enum":["like","dislike"]},"comment":{"type":["string","null"],"maxLength":10000},"messageId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["rating"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"conversationFeedback.delete","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/tags":{"get":{"operationId":"conversationTags.list","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{}}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/bulk-delete":{"post":{"operationId":"conversations.bulkDelete","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":500},"filter":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"},"channel":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]},"archived":{"type":"boolean"},"spam":{"type":"boolean"},"isTest":{"type":"boolean"},"startedAfter":{"type":"string","format":"date-time"},"startedBefore":{"type":"string","format":"date-time"}},"additionalProperties":false},"scope":{"type":"string","enum":["content","all"],"default":"content"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/hangup":{"post":{"operationId":"live.hangup","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.control","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/recording":{"get":{"operationId":"conversations.recording.get","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingUrl"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/reveal":{"post":{"operationId":"conversations.reveal","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"sensitive.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":500},"categories":{"type":"array","items":{"type":"string","enum":["card","bank_account","government_id","date_of_birth","health","address","email","name","phone"]},"minItems":1,"maxItems":9}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealedTranscript"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/transfer":{"post":{"operationId":"live.transfer","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.control","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":1,"maxLength":320},"mode":{"type":"string","enum":["blind","warm"],"default":"blind"},"announce":{"type":"string","maxLength":1000}},"required":["target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/live":{"get":{"operationId":"live.connect","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"topics","in":"query"},{"schema":{"type":"string"},"required":false,"name":"topics[]","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/test-session":{"post":{"operationId":"agents.testSession","tags":["Testing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"wsUrl":{"type":"string","format":"uri"},"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["sessionId","wsUrl","token","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/test-line":{"get":{"operationId":"testLine.get","tags":["Testing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestLine"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/test-calls":{"post":{"operationId":"testCalls.create","tags":["Testing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.place","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallInput"}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/listen":{"post":{"operationId":"live.listen","tags":["Live calls"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.control","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"wsUrl":{"type":"string","format":"uri"},"token":{"type":"string"}},"required":["wsUrl","token"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/conversations/{conversationId}/analyze":{"post":{"operationId":"conversations.analyze","tags":["Conversations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"conversationId","in":"path"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/phone-numbers":{"get":{"operationId":"phoneNumbers.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["reserved","pending","active","porting","released","failed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["purchased","ported","byoc","forwarded"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["telnyx","twilio","jambonz"]},"required":false,"name":"carrier","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"phoneNumbers.purchase","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"reservationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"friendlyName":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOperation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/phone-numbers/{phoneNumberId}":{"get":{"operationId":"phoneNumbers.get","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"phoneNumberId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"phoneNumbers.update","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"phoneNumberId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"friendlyName":{"type":["string","null"],"minLength":1,"maxLength":200},"recordCalls":{"type":"boolean"},"smsEnabled":{"type":"boolean"},"trunkId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"phoneNumbers.release","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"phoneNumberId","in":"path"}],"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOperation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/blocked-numbers":{"get":{"operationId":"blockedNumbers.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockedNumber"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"blockedNumbers.create","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"reason":{"type":["string","null"],"maxLength":1000}},"required":["e164"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedNumber"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/blocked-numbers/{e164}":{"delete":{"operationId":"blockedNumbers.delete","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","parameters":[{"schema":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"required":true,"name":"e164","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/sms-consents":{"get":{"operationId":"smsConsents.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"required":false,"name":"contactE164","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"optedOut","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmsConsent"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/number-reservations":{"get":{"operationId":"numberReservations.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NumberReservation"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"numberReservations.create","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"onboardingSessionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["e164"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberReservation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/port-requests":{"get":{"operationId":"portRequests.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PortRequest"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"portRequests.create","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"minItems":1,"maxItems":100},"currentCarrier":{"type":"string","minLength":1,"maxLength":200},"accountNumber":{"type":"string","minLength":1,"maxLength":100},"pin":{"type":"string","minLength":1,"maxLength":50},"billingAddress":{"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":200},"street2":{"type":["string","null"],"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":100},"postalCode":{"type":"string","minLength":3,"maxLength":20},"country":{"type":"string","pattern":"^[A-Z]{2}$","default":"US"}},"required":["street","city","state","postalCode"],"additionalProperties":false},"authorizedName":{"type":"string","minLength":1,"maxLength":200},"documentUploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":5}},"required":["numbers","currentCarrier","authorizedName"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortRequest"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/port-requests/{portRequestId}":{"get":{"operationId":"portRequests.get","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"portRequestId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortRequest"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"portRequests.update","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"portRequestId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currentCarrier":{"type":"string","minLength":1,"maxLength":200},"accountNumber":{"type":"string","minLength":1,"maxLength":100},"pin":{"type":"string","minLength":1,"maxLength":50},"billingAddress":{"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":200},"street2":{"type":["string","null"],"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":100},"postalCode":{"type":"string","minLength":3,"maxLength":20},"country":{"type":"string","pattern":"^[A-Z]{2}$","default":"US"}},"required":["street","city","state","postalCode"],"additionalProperties":false},"authorizedName":{"type":"string","minLength":1,"maxLength":200},"documentUploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":5}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortRequest"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/ten-dlc":{"get":{"operationId":"tenDlc.get","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"tenDlc.submit","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":255},"ein":{"type":"string","pattern":"^\\d{2}-?\\d{7}$"},"entityType":{"type":"string","enum":["PRIVATE_PROFIT","PUBLIC_PROFIT","NON_PROFIT","GOVERNMENT"],"default":"PRIVATE_PROFIT"},"website":{"type":"string","maxLength":500,"format":"uri"},"vertical":{"type":"string","enum":["AGRICULTURE","COMMUNICATION","CONSTRUCTION","EDUCATION","ENERGY","ENTERTAINMENT","FINANCIAL","GAMBLING","GOVERNMENT","HEALTHCARE","HOSPITALITY","HUMAN_RESOURCES","INSURANCE","LEGAL","MANUFACTURING","NGO","POLITICAL","POSTAL","PROFESSIONAL","REAL_ESTATE","RETAIL","TECHNOLOGY","TRANSPORTATION"],"default":"PROFESSIONAL"},"address":{"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":200},"street2":{"type":["string","null"],"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":2,"maxLength":100},"postalCode":{"type":"string","minLength":3,"maxLength":20},"country":{"type":"string","pattern":"^[A-Z]{2}$","default":"US"}},"required":["street","city","state","postalCode"],"additionalProperties":false},"contact":{"type":"object","properties":{"email":{"type":"string","format":"email"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100}},"required":["email"],"additionalProperties":false},"displayName":{"type":"string","minLength":1,"maxLength":255},"stockSymbol":{"type":"string","pattern":"^[A-Za-z0-9.-]{1,10}$"},"stockExchange":{"type":"string","enum":["NASDAQ","NYSE","AMEX","AMX","ASX","B3","BME","BSE","FRA","ICEX","JPX","JSE","KRX","LON","NSE","OMX","SEHK","SSE","STO","SWX","SZSE","TSX","TWSE","VSE","OTHER"]},"businessContactEmail":{"type":"string","format":"email"}},"required":["legalName","ein","contact"],"additionalProperties":false},"campaign":{"type":"object","properties":{"useCase":{"type":"string","pattern":"^[A-Z0-9_]{3,40}$"},"description":{"type":"string","minLength":40,"maxLength":4096},"sampleMessages":{"type":"array","items":{"type":"string","minLength":20,"maxLength":1024},"minItems":1,"maxItems":5},"optInFlow":{"type":"string","minLength":40,"maxLength":2048},"privacyPolicyLink":{"type":"string","maxLength":500,"format":"uri"},"termsAndConditionsLink":{"type":"string","maxLength":500,"format":"uri"},"embeddedLink":{"type":"boolean","default":false},"embeddedLinkSample":{"type":"string","minLength":1,"maxLength":500},"embeddedPhone":{"type":"boolean","default":false},"numberPool":{"type":"boolean","default":false},"ageGated":{"type":"boolean","default":false},"directLending":{"type":"boolean","default":false}},"required":["useCase","description","sampleMessages","optInFlow"],"additionalProperties":false}},"required":["brand","campaign"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks":{"get":{"operationId":"trunks.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Trunk"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"trunks.create","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"carrier":{"type":"string","enum":["telnyx"],"default":"telnyx"},"inbound":{"type":"boolean","default":true},"outbound":{"type":"boolean","default":false},"routing":{"type":"object","properties":{"defaultAgentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"byExtension":{"type":"object","additionalProperties":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}}},"additionalProperties":false},"allowedIps":{"type":"array","items":{"anyOf":[{"type":"string","format":"ip"},{"type":"string","format":"ip"}]},"maxItems":32}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrunkWithCredentials"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks/{trunkId}":{"get":{"operationId":"trunks.get","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trunk"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"trunks.update","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"inbound":{"type":"boolean"},"outbound":{"type":"boolean"},"routing":{"type":"object","properties":{"defaultAgentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"byExtension":{"type":"object","additionalProperties":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}}},"additionalProperties":false},"status":{"type":"string","enum":["active","disabled"]},"allowedIps":{"type":"array","items":{"anyOf":[{"type":"string","format":"ip"},{"type":"string","format":"ip"}]},"maxItems":32}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trunk"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"trunks.delete","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks/{trunkId}/caller-ids":{"post":{"operationId":"trunkCallerIds.create","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"required":["e164"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrunkCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"trunkCallerIds.list","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TrunkCallerIdRegistration"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks/{trunkId}/caller-ids/{registrationId}":{"get":{"operationId":"trunkCallerIds.get","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrunkCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"trunkCallerIds.revoke","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks/{trunkId}/caller-ids/{registrationId}/evidence":{"post":{"operationId":"trunkCallerIds.submitEvidence","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"uploadId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"kind":{"type":"string","enum":["carrier_bill","carrier_loa","other"]}},"required":["uploadId","kind"],"additionalProperties":false},"minItems":1,"maxItems":3},"attestedName":{"type":"string","minLength":2,"maxLength":200},"attestedTitle":{"type":["string","null"],"maxLength":200},"attestation":{"type":"boolean","enum":[true]}},"required":["documents","attestedName","attestation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrunkCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/caller-ids":{"get":{"operationId":"admin.callerIds.list","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","enum":["awaiting_evidence","pending_review","active","rejected","revoked"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StaffCallerIdRegistration"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/caller-ids/{registrationId}":{"get":{"operationId":"admin.callerIds.get","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/caller-ids/{registrationId}/evidence/{evidenceId}":{"get":{"operationId":"admin.callerIds.evidence","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"evidenceId","in":"path"}],"responses":{"200":{"description":"Export bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/caller-ids/{registrationId}/approve":{"post":{"operationId":"admin.callerIds.approve","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":["string","null"],"maxLength":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/caller-ids/{registrationId}/reject":{"post":{"operationId":"admin.callerIds.reject","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["illegible","number_not_shown","name_mismatch","outdated","wrong_document","other"]},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["reason","note"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/caller-ids/{registrationId}/revoke":{"post":{"operationId":"admin.callerIds.revoke","tags":["SIP trunks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"registrationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["customer_request","ownership_lost","misuse","evidence_invalid","other"]},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["reason","note"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCallerIdRegistration"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/available-phone-numbers":{"get":{"operationId":"phoneNumbers.search","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","enum":["US","CA"],"default":"US"},"required":false,"name":"country","in":"query"},{"schema":{"type":"string","enum":["local","toll_free"],"default":"local"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","pattern":"^[2-9]\\d{2}$"},"required":false,"name":"areaCode","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":false,"name":"city","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}$"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{2,10}$"},"required":false,"name":"contains","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailableNumber"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/number-compass":{"post":{"operationId":"phoneNumbers.compass","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":500},"areaCode":{"type":"string","pattern":"^[2-9]\\d{2}$"},"words":{"type":"array","items":{"type":"string","minLength":1,"maxLength":30},"maxItems":5},"type":{"type":"string","enum":["local","toll_free"],"default":"local"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NumberSuggestion"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/number-reservations/{reservationId}":{"delete":{"operationId":"numberReservations.release","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"reservationId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/phone-numbers/{phoneNumberId}/forwarding-instructions":{"get":{"operationId":"phoneNumbers.forwardingInstructions","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"phoneNumberId","in":"path"},{"schema":{"type":"string","enum":["att","verizon","tmobile","landline"],"default":"landline"},"required":false,"name":"carrier","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardingInstructions"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/port-requests/{portRequestId}/cancel":{"post":{"operationId":"portRequests.cancel","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"portRequestId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortRequest"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/sms-messages":{"get":{"operationId":"smsMessages.list","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["inbound","outbound"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"contactId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"conversationId","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmsMessage"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks/{trunkId}/credentials/rotate":{"post":{"operationId":"trunks.rotateCredentials","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrunkWithCredentials"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/trunks/{trunkId}/test-call":{"post":{"operationId":"trunks.testCall","tags":["Phone numbers"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.place","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"trunkId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tool-types":{"get":{"operationId":"toolTypes.list","x-echowin-permission":"agent.read","tags":["Agent tools"],"summary":"Tool types an agent can use, with their config schema and secret fields","security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"Tool types","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ToolType"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/tools":{"get":{"operationId":"agentTools.list","x-echowin-permission":"agent.read","tags":["Agent tools"],"summary":"An agent's tools, in order","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"The tools","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentTool"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"agentTools.create","x-echowin-permission":"agent.update","tags":["Agent tools"],"summary":"Add a tool to an agent","description":"Credentials go in `secrets` (write-only, stored encrypted); responses show only `{ set, lastFour }`.","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTool"}}}},"responses":{"201":{"description":"The tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTool"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agent-tools/{toolId}":{"get":{"operationId":"agentTools.get","x-echowin-permission":"agent.read","tags":["Agent tools"],"summary":"Get a tool","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"toolId","in":"path"}],"responses":{"200":{"description":"The tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTool"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"agentTools.update","x-echowin-permission":"agent.update","tags":["Agent tools"],"summary":"Update a tool","description":"`config` replaces the whole config. `secrets` changes only the fields given (null removes one).","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"toolId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentTool"}}}},"responses":{"200":{"description":"The tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTool"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"agentTools.delete","x-echowin-permission":"agent.update","tags":["Agent tools"],"summary":"Remove a tool (and its stored credentials)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"toolId","in":"path"},{"schema":{"type":"string","description":"ETag from a previous read; a stale value is 412 precondition_failed"},"required":false,"description":"ETag from a previous read; a stale value is 412 precondition_failed","name":"if-match","in":"header"}],"responses":{"204":{"description":"Removed"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agents/{agentId}/tools/order":{"put":{"operationId":"agentTools.reorder","x-echowin-permission":"agent.update","tags":["Agent tools"],"summary":"Set the order of an agent's tools","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderAgentTools"}}}},"responses":{"200":{"description":"The tools, in order","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentTool"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/languages":{"get":{"operationId":"languages.list","tags":["Agents"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/variables":{"get":{"operationId":"variables.list","tags":["Agents"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"agent.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agent-templates":{"get":{"operationId":"agentTemplates.list","x-echowin-permission":"agent.read","tags":["Agent templates"],"summary":"Templates the acting tenant can use","description":"`scope`: `industry` (echowin's gallery: industry and platform templates), `tenant` (the team's own), `client` (agency client templates: the agency's own, or for a client its agency's). Without `scope`, all of them.","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["industry","tenant","client"]},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"industryId","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"A page of templates","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentTemplate"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"agentTemplates.create","x-echowin-permission":"agent.create","tags":["Agent templates"],"summary":"Save an agent as a template of its tenant","description":"Snapshots the agent's settings and tools. Tool credentials are never copied into templates.","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentTemplate"}}}},"responses":{"201":{"description":"The template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTemplate"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agent-templates/{templateId}":{"get":{"operationId":"agentTemplates.get","x-echowin-permission":"agent.read","tags":["Agent templates"],"summary":"Get a template","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"templateId","in":"path"}],"responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTemplate"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"agentTemplates.update","x-echowin-permission":"agent.update","tags":["Agent templates"],"summary":"Update a team or agency template","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"templateId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentTemplate"}}}},"responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTemplate"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"agentTemplates.delete","x-echowin-permission":"agent.delete","tags":["Agent templates"],"summary":"Delete a team or agency template","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"templateId","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/industries":{"get":{"operationId":"industries.list","x-echowin-permission":"public","tags":["Agent templates"],"summary":"Industries (for the template gallery and onboarding)","security":[],"responses":{"200":{"description":"Industries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Industry"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}}}}},"/clients":{"get":{"operationId":"clients.list","x-echowin-permission":"client.read","tags":["Agencies and clients"],"summary":"The agency's clients (agency members restricted to assigned clients see those only)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["active","pending_approval","suspended"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["-createdAt","name"],"default":"-createdAt"},"required":false,"name":"sort","in":"query"}],"responses":{"200":{"description":"A page of clients","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"clients.create","x-echowin-permission":"client.create","tags":["Agencies and clients"],"summary":"Create a client tenant under the agency","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClient"}}}},"responses":{"201":{"description":"The client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/clients/{clientId}/agents":{"post":{"operationId":"clients.agents.import","x-echowin-permission":"client.update","tags":["Agencies and clients"],"summary":"Copy an agent or create one from a template in a client","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"clientId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAgentToClient"}}}},"responses":{"201":{"description":"The new agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/clients/{clientId}/phone-numbers":{"post":{"operationId":"clients.phoneNumbers.assign","tags":["Agencies and clients"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"number.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"clientId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignClientNumber"}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api-keys":{"get":{"operationId":"apiKeys.list","x-echowin-permission":"api_key.read","tags":["API keys"],"summary":"API keys of the acting tenant","security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"API keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"apiKeys.create","x-echowin-permission":"api_key.create","tags":["API keys"],"summary":"Create an API key for the acting tenant (the key is shown once)","description":"Keys belong to the tenant, not the person who made them, and act with at most admin strength within their scopes. A retry with the same Idempotency-Key answers 409 rather than showing the key again.","security":[{"session":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}}},"responses":{"201":{"description":"The key, with its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api-keys/{keyId}":{"patch":{"operationId":"apiKeys.update","x-echowin-permission":"api_key.create","tags":["API keys"],"summary":"Rename an API key or change its scopes","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"keyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKey"}}}},"responses":{"200":{"description":"The key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"apiKeys.revoke","x-echowin-permission":"api_key.revoke","tags":["API keys"],"summary":"Revoke an API key (it stops working at once)","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"keyId","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/oauth-grants":{"get":{"operationId":"oauthGrants.list","x-echowin-permission":"self","tags":["API keys and connected apps"],"summary":"Apps and MCP clients the user has authorized","description":"The OAuth apps (hosted MCP clients) that hold the signed-in user's consent or live tokens. Grants belong to a person, not a team: an app acts with the user's own memberships. API keys have none.","security":[{"session":[]},{"apiKey":[]}],"responses":{"200":{"description":"Grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthGrantList"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/oauth-grants/{grantId}":{"delete":{"operationId":"oauthGrants.revoke","x-echowin-permission":"self","tags":["API keys and connected apps"],"summary":"Revoke an app's access","description":"Removes the user's consent for the app and deletes every access and refresh token it holds for the user, so its next request is refused and it must ask again.","security":[{"session":[]},{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"grantId","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/uploads":{"post":{"operationId":"uploads.create","x-echowin-permission":"self+purpose","tags":["Uploads"],"security":[{"session":[]},{"apiKey":[]}],"summary":"Start a private direct R2 upload","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpload"}}}},"responses":{"201":{"description":"Upload and 15-minute signed PUT URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStarted"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/uploads/{uploadId}":{"get":{"operationId":"uploads.get","x-echowin-permission":"self+purpose","tags":["Uploads"],"security":[{"session":[]},{"apiKey":[]}],"summary":"Read the caller's upload status","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"uploadId","in":"path"}],"responses":{"200":{"description":"Upload status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/uploads/{uploadId}/complete":{"post":{"operationId":"uploads.complete","x-echowin-permission":"self+purpose","tags":["Uploads"],"security":[{"session":[]},{"apiKey":[]}],"summary":"Verify the landed object and mark the upload ready","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"uploadId","in":"path"}],"responses":{"200":{"description":"Verified upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows":{"get":{"operationId":"workflows.list","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workflow"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"workflows.create","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"draft":{"$ref":"#/components/schemas/WorkflowGraph"}},"required":["name","agentId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/generate":{"post":{"operationId":"workflows.generate","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":10,"maxLength":4000},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"trigger":{"type":"string","enum":["pre_call","post_call","post_chat","manual","schedule","event"]}},"required":["description"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/WorkflowGraph"}},"required":["draft"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}":{"get":{"operationId":"workflows.get","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"expand","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"workflows.update","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"active":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"workflows.delete","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/draft":{"put":{"operationId":"workflows.draft.save","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/WorkflowGraph"}},"required":["draft"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/publish":{"post":{"operationId":"workflows.publish","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/clone":{"post":{"operationId":"workflows.clone","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/versions":{"get":{"operationId":"workflows.versions.list","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowVersion"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/versions/{versionId}/restore":{"post":{"operationId":"workflows.versions.restore","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflow-node-types":{"get":{"operationId":"workflowNodeTypes.list","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowNodeType"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/triggers":{"get":{"operationId":"workflowTriggers.list","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowTrigger"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"workflowTriggers.create","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger":{"type":"string","enum":["pre_call","post_call","post_chat","manual","schedule","event"]},"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"enabled":{"type":"boolean"},"waitForResult":{"type":"boolean"},"schedule":{"type":["string","null"],"maxLength":100,"pattern":"^(\\S+\\s+){4}\\S+$"},"eventType":{"type":["string","null"],"pattern":"^[a-z_]+(\\.[a-z_]+|\\.\\*)$"},"position":{"type":"integer","minimum":0,"maximum":10000}},"required":["trigger"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTrigger"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflow-triggers/{triggerId}":{"patch":{"operationId":"workflowTriggers.update","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"waitForResult":{"type":"boolean"},"schedule":{"type":["string","null"],"maxLength":100,"pattern":"^(\\S+\\s+){4}\\S+$"},"eventType":{"type":["string","null"],"pattern":"^[a-z_]+(\\.[a-z_]+|\\.\\*)$"},"position":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTrigger"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"workflowTriggers.delete","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflows/{workflowId}/test-runs":{"post":{"operationId":"workflows.testRun","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"sample":{"type":"object","additionalProperties":{}}},"additionalProperties":false},"versionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"live":{"type":"boolean","default":false}},"required":["input"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExecution"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflow-executions":{"get":{"operationId":"workflowExecutions.list","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"workflowId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["pre_call","post_call","post_chat","manual","schedule","event"]},"required":false,"name":"trigger","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"conversationId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"isTest","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowExecution"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflow-executions/{executionId}":{"get":{"operationId":"workflowExecutions.get","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExecution"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflow-executions/{executionId}/cancel":{"post":{"operationId":"workflowExecutions.cancel","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExecution"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/workflow-executions/{executionId}/retry":{"post":{"operationId":"workflowExecutions.retry","tags":["Workflows"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"workflow.update","responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExecution"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns":{"get":{"operationId":"campaigns.list","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["-createdAt","name"],"default":"-createdAt"},"required":false,"name":"sort","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"campaigns.create","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":"string","minLength":1,"maxLength":20000},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"timeZone":{"type":"string","minLength":1,"maxLength":64},"callingHours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"minItems":1,"maxItems":7}},"required":["start","end","days"],"additionalProperties":false},"retry":{"type":"object","properties":{"maxAttempts":{"type":"integer","minimum":1,"maximum":5,"default":1},"intervalMinutes":{"type":"integer","minimum":5,"maximum":10080,"default":60}},"additionalProperties":false},"consentAttestation":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":2000}},"required":["statement"],"additionalProperties":false},"contacts":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":32},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":320,"format":"email"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"required":["to"],"additionalProperties":false},"maxItems":100}},"required":["agentId","name","instructions"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Campaign"},{"type":"object","properties":{"added":{"type":"integer"},"merged":{"type":"integer"},"skipped":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"to":{"type":"string"},"reason":{"type":"string","enum":["invalid_number","unsupported_destination","duplicate","already_in_campaign","do_not_call","value_limit"]}},"required":["index","to","reason"]}}},"required":["added","merged","skipped"]}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}":{"get":{"operationId":"campaigns.get","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"campaigns.update","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":"string","minLength":1,"maxLength":20000},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"timeZone":{"type":"string","minLength":1,"maxLength":64},"callingHours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"minItems":1,"maxItems":7}},"required":["start","end","days"],"additionalProperties":false},"retry":{"type":"object","properties":{"maxAttempts":{"type":"integer","minimum":1,"maximum":5,"default":1},"intervalMinutes":{"type":"integer","minimum":5,"maximum":10080,"default":60}},"additionalProperties":false},"consentAttestation":{"type":["object","null"],"properties":{"statement":{"type":"string","minLength":1,"maxLength":2000}},"required":["statement"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"campaigns.delete","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/start":{"post":{"operationId":"campaigns.start","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.place","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startAt":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/pause":{"post":{"operationId":"campaigns.pause","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/cancel":{"post":{"operationId":"campaigns.cancel","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/rerun":{"post":{"operationId":"campaigns.rerun","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"string","enum":["failed","no_answer","busy"]},"minItems":1,"default":["failed","no_answer","busy"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/stats":{"get":{"operationId":"campaigns.stats","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStats"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/contacts":{"get":{"operationId":"campaignContacts.list","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignContact"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"campaignContacts.add","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":32},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":320,"format":"email"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"required":["to"],"additionalProperties":false},"minItems":1,"maxItems":1000}},"required":["contacts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"},"merged":{"type":"integer"},"skipped":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"to":{"type":"string"},"reason":{"type":"string","enum":["invalid_number","unsupported_destination","duplicate","already_in_campaign","do_not_call","value_limit"]}},"required":["index","to","reason"]}},"totalContacts":{"type":"integer"}},"required":["added","merged","skipped","totalContacts"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaigns/{campaignId}/contacts/import":{"post":{"operationId":"campaignContacts.import","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":10000},"listId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"filter":{"type":"object","properties":{"tagIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"minItems":1,"maxItems":20}},"required":["tagIds"],"additionalProperties":false},"uploadId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"mapping":{"type":"object","additionalProperties":{}},"phone":{"type":"object","properties":{"countryCodeColumn":{"type":"string","minLength":1,"maxLength":200},"defaultCountryCode":{"type":"string","pattern":"^[1-9]\\d{0,3}$"}},"additionalProperties":false},"fromCampaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"},"skipped":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"reason":{"type":"string"}},"required":["contactId","reason"]}}},"required":["added","skipped"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/campaign-contacts/{campaignContactId}":{"delete":{"operationId":"campaignContacts.remove","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/scheduled-calls":{"get":{"operationId":"scheduledCalls.list","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"contactId","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledCall"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"scheduledCalls.create","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.place","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"toE164":{"type":"string","minLength":1,"maxLength":32},"scheduledAt":{"type":"string","format":"date-time"},"instructions":{"type":"string","maxLength":20000},"contactId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"phoneNumberId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxAttempts":{"type":"integer","minimum":1,"maximum":5},"retryIntervalMinutes":{"type":"integer","minimum":1,"maximum":1440},"metadata":{"type":"object","additionalProperties":{}}},"required":["agentId","toE164"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCall"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/scheduled-calls/{scheduledCallId}":{"get":{"operationId":"scheduledCalls.get","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"conversation.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCall"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"scheduledCalls.update","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.place","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"},"instructions":{"type":["string","null"],"maxLength":20000},"maxAttempts":{"type":"integer","minimum":1,"maximum":5},"retryIntervalMinutes":{"type":"integer","minimum":1,"maximum":1440}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCall"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/scheduled-calls/{scheduledCallId}/cancel":{"post":{"operationId":"scheduledCalls.cancel","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"call.place","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCall"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integrations/gohighlevel/triggers/add-to-campaign":{"post":{"operationId":"ghlTriggers.addToCampaign","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,200}$"},"timestamp":{"type":"integer"},"campaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"campaign":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":"string","minLength":1,"maxLength":20000},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"timeZone":{"type":"string","minLength":1,"maxLength":64},"callingHours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"minItems":1,"maxItems":7}},"required":["start","end","days"],"additionalProperties":false},"retry":{"type":"object","properties":{"maxAttempts":{"type":"integer","minimum":1,"maximum":5,"default":1},"intervalMinutes":{"type":"integer","minimum":5,"maximum":10080,"default":60}},"additionalProperties":false},"consentAttestation":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":2000}},"required":["statement"],"additionalProperties":false}},"required":["agentId","name","instructions"],"additionalProperties":false},"contact":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":32},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":320,"format":"email"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"required":["to"],"additionalProperties":false},"startOutbound":{"type":"boolean","default":false}},"required":["eventId","timestamp","contact"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"campaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"added":{"type":"integer"},"campaignStarted":{"type":"boolean"},"outcome":{"type":"string","enum":["pending","completed","uncertain"]}},"required":["accepted","campaignId","added","campaignStarted","outcome"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integrations/gohighlevel/triggers/add-to-new-campaign":{"post":{"operationId":"ghlTriggers.addToNewCampaign","tags":["Campaigns"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"campaign.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,200}$"},"timestamp":{"type":"integer"},"campaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"campaign":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":"string","minLength":1,"maxLength":20000},"phoneNumberId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"timeZone":{"type":"string","minLength":1,"maxLength":64},"callingHours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"minItems":1,"maxItems":7}},"required":["start","end","days"],"additionalProperties":false},"retry":{"type":"object","properties":{"maxAttempts":{"type":"integer","minimum":1,"maximum":5,"default":1},"intervalMinutes":{"type":"integer","minimum":5,"maximum":10080,"default":60}},"additionalProperties":false},"consentAttestation":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":2000}},"required":["statement"],"additionalProperties":false}},"required":["agentId","name","instructions"],"additionalProperties":false},"contact":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":32},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":320,"format":"email"},"fields":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"required":["to"],"additionalProperties":false},"startOutbound":{"type":"boolean","default":false}},"required":["eventId","timestamp","contact"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"campaignId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"added":{"type":"integer"},"campaignStarted":{"type":"boolean"},"outcome":{"type":"string","enum":["pending","completed","uncertain"]}},"required":["accepted","campaignId","added","campaignStarted","outcome"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/call-consents":{"get":{"operationId":"callConsents.list","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":32},"required":false,"name":"e164","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"contactId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallConsent"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"callConsents.create","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","minLength":1,"maxLength":32},"contactId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"type":{"type":"string","enum":["prior_express","prior_express_written","existing_business_relationship"]},"source":{"type":"string","enum":["web_form","verbal","written","import","api","other"]},"capturedAt":{"type":"string","format":"date-time"},"evidence":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"text":{"type":"string","maxLength":5000},"uploadId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"ipAddress":{"type":"string","maxLength":64},"userAgent":{"type":"string","maxLength":500},"recordingConversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"additionalProperties":false},"attestation":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":2000}},"required":["statement"],"additionalProperties":false}},"required":["e164","type","source","capturedAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallConsent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/call-consents/{consentId}":{"get":{"operationId":"callConsents.get","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallConsent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/call-consents/{consentId}/revoke":{"post":{"operationId":"callConsents.revoke","tags":["Contacts"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"contact.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallConsent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tickets":{"get":{"operationId":"tickets.list","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"ticket.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"tickets.create","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"ticket.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":50000},"conversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"uploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":10,"default":[]}},"required":["subject","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Ticket"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/TicketMessage"}}},"required":["messages"]}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tickets/{ticketId}":{"get":{"operationId":"tickets.get","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"ticket.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Ticket"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/TicketMessage"}}},"required":["messages"]}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tickets/{ticketId}/messages":{"post":{"operationId":"tickets.reply","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"ticket.create","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":50000},"uploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":10,"default":[]}},"required":["body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tickets/{ticketId}/attachments/{uploadId}":{"get":{"operationId":"tickets.attachments.get","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"ticket.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"uploadId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"fileName":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","fileName","contentType","sizeBytes","url","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tickets/{ticketId}/attachments/{uploadId}":{"get":{"operationId":"admin.tickets.attachments.get","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.ticket.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"uploadId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"fileName":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["id","fileName","contentType","sizeBytes","url","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tickets":{"get":{"operationId":"admin.tickets.list","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.ticket.manage","parameters":[{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["customer","internal"]},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"tenantId","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},{"type":"string","enum":["none"]}]},"required":false,"name":"assignee","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StaffTicket"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"admin.tickets.create","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.ticket.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"scope":{"type":"string","enum":["customer","internal"],"default":"internal"},"subject":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":50000},"type":{"type":"string","minLength":1,"maxLength":50,"default":"task"},"priority":{"type":"string","enum":["low","normal","high","urgent"],"default":"normal"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20,"default":[]},"assigneeUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"requesterEmail":{"type":"string","format":"email"},"requesterName":{"type":"string","maxLength":200}},"required":["subject","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffTicket"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tickets/{ticketId}":{"get":{"operationId":"admin.tickets.get","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.ticket.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"admin.tickets.update","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.ticket.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","pending","on_hold","solved","closed"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"assigneeUserId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"type":{"type":"string","minLength":1,"maxLength":50},"subject":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffTicket"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/admin/tickets/{ticketId}/messages":{"post":{"operationId":"admin.tickets.reply","tags":["Support tickets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"platform.ticket.manage","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"ticketId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":50000},"internal":{"type":"boolean","default":false},"draft":{"type":"boolean","default":false},"sendDraftId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"uploadIds":{"type":"array","items":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"maxItems":10,"default":[]}},"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffTicketMessage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/event-types":{"get":{"operationId":"eventTypes.list","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints":{"get":{"operationId":"webhookEndpoints.list","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"webhookEndpoints.create","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"name":{"type":"string","maxLength":200},"events":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"sensitiveData":{"type":"string","enum":["masked","full"]},"enabled":{"type":"boolean"}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"]}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints/{endpointId}":{"get":{"operationId":"webhookEndpoints.get","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"webhookEndpoints.update","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"name":{"type":"string","maxLength":200},"events":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"sensitiveData":{"type":"string","enum":["masked","full"]},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"webhookEndpoints.delete","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.manage","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints/{endpointId}/rotate-secret":{"post":{"operationId":"webhookEndpoints.rotateSecret","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"previousExpiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["secret","previousExpiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints/{endpointId}/test":{"post":{"operationId":"webhookEndpoints.test","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventType":{"type":"string"}},"required":["eventType"]}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-endpoints/{endpointId}/deliveries":{"get":{"operationId":"webhookDeliveries.list","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"eventType","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries/{deliveryId}":{"get":{"operationId":"webhookDeliveries.get","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries/{deliveryId}/retry":{"post":{"operationId":"webhookDeliveries.retry","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/events":{"get":{"operationId":"events.list","tags":["Webhooks"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"webhook.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"since","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/account":{"get":{"operationId":"billing.account.get","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAccount"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"billing.account.update","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoReload":{"type":"boolean"},"autoReloadThresholdMc":{"type":"integer","exclusiveMinimum":0},"autoReloadAmountMc":{"type":"integer","exclusiveMinimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAccount"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/entitlements":{"get":{"operationId":"entitlements.get","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlements"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/plans":{"get":{"operationId":"plans.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/subscriptions":{"get":{"operationId":"subscriptions.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"subscriptions.create","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planVersionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"interval":{"type":"string","enum":["month","year"]},"promoCode":{"type":"string","minLength":1,"maxLength":100},"quantity":{"type":"integer","minimum":1,"maximum":1000}},"required":["planVersionId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"object","properties":{"checkoutUrl":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["checkoutUrl","expiresAt"]}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/subscriptions/{subscriptionId}":{"patch":{"operationId":"subscriptions.change","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planVersionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"interval":{"type":"string","enum":["month","year"]},"quantity":{"type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/subscriptions/{subscriptionId}/cancel":{"post":{"operationId":"subscriptions.cancel","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"atPeriodEnd":{"type":"boolean","default":true},"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/subscriptions/{subscriptionId}/resume":{"post":{"operationId":"subscriptions.resume","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/checkout-sessions":{"post":{"operationId":"billing.checkout.create","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["top_up","subscription","go_live"]},"amountMc":{"type":"integer","exclusiveMinimum":0},"planVersionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"interval":{"type":"string","enum":["month","year"]},"promoCode":{"type":"string","minLength":1,"maxLength":100},"reservationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"successUrl":{"type":"string","maxLength":2000,"format":"uri"},"cancelUrl":{"type":"string","maxLength":2000,"format":"uri"}},"required":["purpose","successUrl","cancelUrl"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["url","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/top-ups":{"post":{"operationId":"billing.topUps.create","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountMc":{"type":"integer","exclusiveMinimum":0}},"required":["amountMc"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntry"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/payment-methods":{"get":{"operationId":"paymentMethods.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/setup-sessions":{"post":{"operationId":"paymentMethods.setup","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"successUrl":{"type":"string","maxLength":2000,"format":"uri"},"cancelUrl":{"type":"string","maxLength":2000,"format":"uri"}},"required":["successUrl","cancelUrl"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/payment-methods/{paymentMethodId}/default":{"put":{"operationId":"paymentMethods.setDefault","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"paymentMethodId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/payment-methods/{paymentMethodId}":{"delete":{"operationId":"paymentMethods.delete","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"paymentMethodId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/portal-sessions":{"post":{"operationId":"billing.portal.create","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","maxLength":2000,"format":"uri"}},"required":["returnUrl"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/ledger":{"get":{"operationId":"billing.ledger.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string"},"required":false,"name":"bucket","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/credit-grants":{"get":{"operationId":"billing.creditGrants.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"bucket","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"active","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditGrant"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/invoices":{"get":{"operationId":"invoices.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/invoices/{invoiceId}":{"get":{"operationId":"invoices.get","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/billing/promo-redemptions":{"post":{"operationId":"promoCodes.redeem","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100}},"required":["code"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoRedemption"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/usage":{"get":{"operationId":"usage.summary","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"string","format":"date"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["day","kind","agent","client"],"default":"day"},"required":false,"name":"groupBy","in":"query"},{"schema":{"type":"string"},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"clientId","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageRow"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/usage/events":{"get":{"operationId":"usage.events.list","tags":["Billing"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"conversationId","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageEvent"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/referrals":{"get":{"operationId":"referrals.get","x-echowin-permission":"billing.read","security":[{"session":[]},{"apiKey":[]}],"tags":["Referrals"],"summary":"Your referral code and recorded referral reward states","responses":{"200":{"description":"Referral summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Referral"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/chat-widgets":{"get":{"operationId":"chatWidgets.list","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatWidget"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"chatWidgets.create","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"websiteUrl":{"type":"string","maxLength":2000,"format":"uri"},"allowedDomains":{"type":"array","items":{"type":"string","pattern":"^(\\*\\.)?([a-z0-9-]+\\.)+[a-z]{2,}$|^localhost(:\\d+)?$"},"maxItems":50},"initialMessage":{"type":["string","null"],"maxLength":2000},"suggestions":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":10},"theme":{"type":"string"},"logoUploadId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"voiceMode":{"type":"boolean"},"config":{"$ref":"#/components/schemas/ChatWidgetConfig"}},"required":["agentId","name","websiteUrl"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidget"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/chat-widgets/{widgetId}":{"get":{"operationId":"chatWidgets.get","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidget"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"chatWidgets.update","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"name":{"type":"string","minLength":1,"maxLength":200},"websiteUrl":{"type":"string","maxLength":2000,"format":"uri"},"allowedDomains":{"type":"array","items":{"type":"string","pattern":"^(\\*\\.)?([a-z0-9-]+\\.)+[a-z]{2,}$|^localhost(:\\d+)?$"},"maxItems":50},"initialMessage":{"type":["string","null"],"maxLength":2000},"suggestions":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":10},"theme":{"type":"string"},"logoUploadId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"voiceMode":{"type":"boolean"},"config":{"$ref":"#/components/schemas/ChatWidgetConfig"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidget"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"chatWidgets.delete","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.manage","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/chat-widgets/{widgetId}/rotate-key":{"post":{"operationId":"chatWidgets.rotateKey","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatWidget"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/chat-widgets/{widgetId}/embed-code":{"get":{"operationId":"chatWidgets.embedCode","tags":["Chat widgets"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"widget.read","parameters":[{"schema":{"type":"string","enum":["floating","large"],"default":"floating"},"required":false,"name":"layout","in":"query"},{"schema":{"type":"string"},"required":false,"name":"theme","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"hasVoice","in":"query"},{"schema":{"type":"string","enum":["logo","filled"]},"required":false,"name":"launcherStyle","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"openByDefault","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"},"scriptUrl":{"type":"string"}},"required":["html","scriptUrl"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integrations":{"get":{"operationId":"integrations.list","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integration-connections":{"get":{"operationId":"integrationConnections.list","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","parameters":[{"schema":{"type":"string"},"required":false,"name":"provider","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationConnection"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integration-connections/{provider}/authorize":{"post":{"operationId":"integrationConnections.authorize","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","minLength":1,"maxLength":2000},"shop":{"type":"string","maxLength":255}},"required":["returnUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"authorizeUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["authorizeUrl","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/oauth/callback/{provider}":{"get":{"operationId":"integrationConnections.callback","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"public","parameters":[{"schema":{"type":"string"},"required":false,"name":"code","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/shopify/pending-install":{"get":{"operationId":"integrationConnections.shopifyPending","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"}},"required":["shop","expiresAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/shopify/pending-install/connect":{"post":{"operationId":"integrationConnections.shopifyConnect","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnection"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integration-connections/{connectionId}":{"get":{"operationId":"integrationConnections.get","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnection"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"integrationConnections.update","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":["string","null"],"maxLength":200},"metadata":{"type":"object","properties":{"defaultCalendarId":{"type":["string","null"],"maxLength":500},"locationId":{"type":["string","null"],"maxLength":200},"serviceId":{"type":["string","null"],"maxLength":200},"pipelineId":{"type":["string","null"],"maxLength":200},"timeZone":{"type":["string","null"],"maxLength":64}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnection"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"integrationConnections.delete","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/integration-connections/{connectionId}/resources":{"get":{"operationId":"integrationConnections.resources","tags":["Integrations"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","parameters":[{"schema":{"type":"string","enum":["calendars","services","resources","locations","pipelines"]},"required":true,"name":"type","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderResource"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/calendars":{"get":{"operationId":"calendars.list","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Calendar"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"calendars.create","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"timezone":{"type":"string","minLength":1,"maxLength":64},"availability":{"type":"object","properties":{"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["day","start","end"],"additionalProperties":false},"maxItems":50},"exceptions":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"closed":{"type":"boolean"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["date"],"additionalProperties":false},"maxItems":366,"default":[]},"leadTimeMinutes":{"type":"integer","minimum":0,"maximum":43200,"default":0},"maxLeadDays":{"type":"integer","minimum":1,"maximum":365,"default":60},"maxPerDay":{"type":["integer","null"],"minimum":1,"maximum":500,"default":null}},"required":["weekly"],"additionalProperties":false},"slotMinutes":{"type":"integer","minimum":5,"maximum":480}},"required":["name","timezone","availability"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/calendars/{calendarId}":{"patch":{"operationId":"calendars.update","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"timezone":{"type":"string","minLength":1,"maxLength":64},"availability":{"type":"object","properties":{"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["day","start","end"],"additionalProperties":false},"maxItems":50},"exceptions":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"closed":{"type":"boolean"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["date"],"additionalProperties":false},"maxItems":366,"default":[]},"leadTimeMinutes":{"type":"integer","minimum":0,"maximum":43200,"default":0},"maxLeadDays":{"type":"integer","minimum":1,"maximum":365,"default":60},"maxPerDay":{"type":["integer","null"],"minimum":1,"maximum":500,"default":null}},"required":["weekly"],"additionalProperties":false},"slotMinutes":{"type":"integer","minimum":5,"maximum":480}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"calendars.delete","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","responses":{"204":{"description":"Deleted"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/calendars/{calendarId}/slots":{"get":{"operationId":"calendars.slots","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timezone","in":"query"},{"schema":{"type":"integer","minimum":5,"maximum":480},"required":false,"name":"durationMinutes","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/appointments":{"get":{"operationId":"appointments.list","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"calendarId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"contactId","in":"query"},{"schema":{"type":"string","enum":["booked","canceled"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Appointment"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"appointments.create","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calendarId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"integrationConnectionId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"title":{"type":"string","maxLength":500},"contactId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"attendee":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320,"format":"email"},"phone":{"type":"string","maxLength":32}},"additionalProperties":false},"details":{"type":"object","additionalProperties":{}}},"required":["startsAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Appointment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/appointments/{appointmentId}":{"get":{"operationId":"appointments.get","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Appointment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"appointments.update","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"title":{"type":"string","maxLength":500},"details":{"type":"object","additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Appointment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/appointments/{appointmentId}/cancel":{"post":{"operationId":"appointments.cancel","tags":["Calendars and appointments"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"integration.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Appointment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/agency":{"get":{"operationId":"onboarding.agency.get","tags":["Onboarding (try before signup)"],"security":[],"x-echowin-permission":"public","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":253},"required":true,"name":"host","in":"query"}],"responses":{"200":{"description":"Enabled agency branding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingAgencyBrand"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions":{"post":{"operationId":"onboarding.sessions.create","tags":["Onboarding (try before signup)"],"security":[],"x-echowin-permission":"public","parameters":[{"schema":{"type":"string"},"required":false,"name":"cf-turnstile-token","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOnboardingSession"}}}},"responses":{"201":{"description":"Session started","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/OnboardingSession"},"token":{"type":"string"}},"required":["session","token"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}":{"get":{"operationId":"onboarding.sessions.get","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"responses":{"200":{"description":"Onboarding session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingSession"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"onboarding.sessions.update","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOnboardingSession"}}}},"responses":{"200":{"description":"Onboarding session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingSession"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/events":{"get":{"operationId":"onboarding.sessions.events","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"responses":{"200":{"description":"Server-sent `progress` events until the build ends (`done`)","content":{"text/event-stream":{"schema":{"type":"string"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/build":{"post":{"operationId":"onboarding.sessions.retryBuild","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryOnboardingBuild"}}}},"responses":{"200":{"description":"Onboarding session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingSession"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/number-suggestions":{"get":{"operationId":"onboarding.numberSuggestions","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","enum":["local","toll_free"],"default":"local"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"responses":{"200":{"description":"Onboarding session","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NumberSuggestion"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/number-reservation":{"put":{"operationId":"onboarding.reservation.set","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"required":["e164"],"additionalProperties":false}}}},"responses":{"200":{"description":"Onboarding session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingNumberReservation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"onboarding.reservation.release","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"responses":{"204":{"description":"Done"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/voice-sessions":{"post":{"operationId":"onboarding.voice.create","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"responses":{"201":{"description":"Onboarding session","content":{"application/json":{"schema":{"type":"object","properties":{"wsUrl":{"type":"string"},"token":{"type":"string"},"secondsRemaining":{"type":"integer"}},"required":["wsUrl","token","secondsRemaining"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/call-me":{"post":{"operationId":"onboarding.callMe","tags":["Onboarding (try before signup)"],"security":[{"onboardingToken":[]}],"x-echowin-permission":"onboarding token","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"e164":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"consent":{"type":"boolean","enum":[true]}},"required":["e164","consent"],"additionalProperties":false}}}},"responses":{"201":{"description":"Onboarding session","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["calling"]},"conversationId":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"}},"required":["status","conversationId"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/sessions/{sessionId}/claim":{"post":{"operationId":"onboarding.claim","tags":["Onboarding (try before signup)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","description":"The token returned when the session started"},"required":false,"description":"The token returned when the session started","name":"x-onboarding-token","in":"header"}],"responses":{"201":{"description":"Saved to your account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingClaim"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/onboarding/checklist":{"get":{"operationId":"onboarding.checklist.get","tags":["Onboarding (try before signup)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Checklist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checklist"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"onboarding.checklist.update","tags":["Onboarding (try before signup)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"object","properties":{"agent_built":{"type":"boolean"},"fix_answer":{"type":"boolean"},"hours_transfer":{"type":"boolean"},"test_again":{"type":"boolean"}}},"dismissed":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Checklist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checklist"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/go-live":{"post":{"operationId":"onboarding.goLive","tags":["Onboarding (try before signup)"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoLive"}}}},"responses":{"200":{"description":"Checkout to complete, or the number being set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoLiveResult"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Balance or payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/agency/self-onboarding":{"get":{"operationId":"agency.selfOnboarding.get","tags":["Agencies and clients"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Self onboarding settings and verified link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfOnboardingView"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"agency.selfOnboarding.set","tags":["Agencies and clients"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfOnboarding"}}}},"responses":{"200":{"description":"Self onboarding settings and verified link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfOnboardingView"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/analytics/calls":{"get":{"operationId":"analytics.calls","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"],"default":"day"},"required":false,"name":"interval","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timezone","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["inbound","outbound"]},"required":false,"name":"direction","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSeries"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/analytics/chats":{"get":{"operationId":"analytics.chats","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"],"default":"day"},"required":false,"name":"interval","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timezone","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["web_chat","voice_chat"]},"required":false,"name":"channel","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSeries"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/analytics/campaigns":{"get":{"operationId":"analytics.campaigns","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"],"default":"day"},"required":false,"name":"interval","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timezone","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"campaignId","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSeries"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/analytics/contacts":{"get":{"operationId":"analytics.contacts","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"],"default":"day"},"required":false,"name":"interval","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timezone","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSeries"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/analytics/team-insights":{"get":{"operationId":"analytics.teamInsights","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":4000},"required":false,"name":"tenantIds","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInsights"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dashboard":{"get":{"operationId":"dashboard.get","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/tags":{"get":{"operationId":"insights.tags","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","maxLength":60},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagInsights"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/tag-preferences":{"get":{"operationId":"insights.tagPreferences.list","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagPreference"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"insights.tagPreferences.set","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":["string","null"],"format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"preferences":{"type":"array","items":{"type":"object","properties":{"tagName":{"type":"string","minLength":1,"maxLength":120},"pinned":{"type":"boolean","default":false},"hidden":{"type":"boolean","default":false},"settings":{"type":["object","null"],"additionalProperties":{}}},"required":["tagName"],"additionalProperties":false},"maxItems":200}},"required":["preferences"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagPreference"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/digests":{"get":{"operationId":"insights.digests.list","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","maxLength":60},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InsightDigest"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/digests/{digestId}":{"get":{"operationId":"insights.digests.get","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"digestId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightDigest"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/actionable":{"get":{"operationId":"insights.actionable.list","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["open","done","dismissed"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ActionableInsight"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/actionable/{insightId}":{"patch":{"operationId":"insights.actionable.update","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.update","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"insightId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","done","dismissed"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionableInsight"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/search":{"get":{"operationId":"search.global","tags":["Analytics and insights"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"self+purpose","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"types","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":20,"default":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/insights/actionable/generate":{"post":{"operationId":"insights.actionable.generate","tags":["Insight generation"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"analytics.update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/audit-events":{"get":{"operationId":"auditEvents.list","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"audit.read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"description":"`nextCursor` from the previous page"},"required":false,"description":"`nextCursor` from the previous page","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"action","in":"query"},{"schema":{"type":"string","enum":["user","api_key","agent","system","staff"]},"required":false,"name":"actorType","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"actorId","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"targetType","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"targetId","in":"query"},{"schema":{"type":"string","enum":["portal","api_v1","api_v2","mcp","job","system"]},"required":false,"name":"origin","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-11-04T19:39:18.123Z"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"includeClients","in":"query"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/audit-events/{seq}":{"get":{"operationId":"auditEvents.get","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"audit.read","parameters":[{"schema":{"type":"string"},"required":true,"name":"seq","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEvent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/audit-events/verify":{"post":{"operationId":"auditEvents.verify","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"audit.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromSeq":{"type":"integer","minimum":1},"toSeq":{"type":"integer","minimum":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditVerifyResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/compliance/settings":{"get":{"operationId":"compliance.settings.get","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSettings"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"compliance.settings.set","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"compliance.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"complianceLevel":{"type":"string","enum":["standard","regulated"]},"maskingPolicy":{"type":"object","properties":{"card":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"bank_account":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"government_id":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"date_of_birth":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"health":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"address":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"email":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"name":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]},"phone":{"type":"string","enum":["keep","mask_display","mask_at_rest","never_store"]}}},"enforceForClients":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceSettings"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/retention-policies":{"get":{"operationId":"retentionPolicies.list","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"tenant.read","responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetentionPolicy"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/retention-policies/{dataType}":{"put":{"operationId":"retentionPolicies.set","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"compliance.manage","parameters":[{"schema":{"type":"string"},"required":true,"name":"dataType","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"retainDays":{"type":["integer","null"],"minimum":1,"maximum":3650},"legalHold":{"type":"boolean"},"legalHoldReason":{"type":["string","null"],"minLength":1,"maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionPolicy"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/exports":{"post":{"operationId":"exports.create","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"<kind>.export","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["conversations","transcripts","contacts","usage","audit_log","tenant"]},"filter":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid"},"channel":{"type":"string","enum":["phone","web_chat","voice_chat","playground_chat","playground_voice","sms","api"]}},"default":{},"additionalProperties":false},"format":{"type":"string","enum":["csv","ndjson","json"],"default":"ndjson"},"includeSensitive":{"type":"boolean","default":false}},"required":["kind"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/exports/{jobId}":{"get":{"operationId":"exports.get","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"<kind>.export","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/data-deletions":{"post":{"operationId":"dataDeletions.create","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"data.delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["conversations_before","recordings_before","contact"]},"before":{"type":"string","format":"date-time"},"contactId":{"type":"string","format":"uuid"}},"required":["kind"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/data-deletions/{jobId}":{"get":{"operationId":"dataDeletions.get","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"data.delete","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/exports/{jobId}/download":{"get":{"operationId":"exports.download","tags":["Compliance and audit"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"<kind>.export","parameters":[{"schema":{"type":"string","format":"uuid","example":"0195f0c4-8a3e-7b1c-9d2e-3f4a5b6c7d8e"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Export bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/leads":{"post":{"operationId":"public.leads.create","tags":["Public"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"public","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLead"}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadReceipt"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/demo-sessions":{"post":{"operationId":"public.demoSessions.create","tags":["Public"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"public","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDemoSession"}}}},"responses":{"200":{"description":"Conversation resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoSession"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/account-recovery":{"post":{"operationId":"public.accountRecovery.create","tags":["Public"],"security":[{"session":[]},{"apiKey":[]}],"x-echowin-permission":"public","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"name":{"type":"string","minLength":1,"maxLength":200},"details":{"type":"string","minLength":1,"maxLength":5000}},"required":["email","name","details"],"additionalProperties":false}}}},"responses":{"202":{"description":"Conversation resource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Not signed in, or the API key is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone (expired)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"If-Match does not match the current version","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed, or idempotency key reused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/email/unsubscribe":{"post":{"operationId":"public.emailUnsubscribe","x-echowin-permission":"public","tags":["Public"],"summary":"One-click unsubscribe (RFC 8058)","description":"The target of a team notification's `List-Unsubscribe` link. Mail providers POST `List-Unsubscribe=One-Click` to the signed URL; the token may also be sent as a `token` form or JSON field. Turns that one notification category off for the member (their other settings are unchanged); mail without a team category suppresses the address. Idempotent.","security":[],"parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"token","in":"query"}],"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A dependency is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}