{"openapi":"3.1.0","info":{"title":"CallBoi API","version":"2026-07-01","description":"Multi-tenant API for AI-powered telephone operations. All identifiers are prefixed ULIDs. Mutating endpoints accept an Idempotency-Key header. Long-running operations return 202 with a job id."},"servers":[{"url":"https://api-callboi.boilab.ai","description":"Production"},{"url":"http://localhost:3001","description":"Local development"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key (cbk_…), OAuth access token (cbo_…, minted for the MCP server) or dashboard session token (cbs_…)."}},"schemas":{},"parameters":{}},"paths":{"/v1/tenant":{"get":{"operationId":"getTenant","summary":"Get the current tenant","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ten_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["active","suspended","closed"]},"countryCode":{"type":"string","minLength":2,"maxLength":2},"defaultLocale":{"type":"string"},"defaultTimezone":{"type":"string","minLength":1,"maxLength":64},"sector":{"type":["string","null"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"compliance":{"type":"object","properties":{"processingRegion":{"type":["string","null"]},"dpaStatus":{"type":["string","null"],"enum":["not_signed","pending","signed",null]},"crossBorderTransferMechanism":{"type":["string","null"]},"subprocessorVersion":{"type":["string","null"]},"recordingPolicy":{"type":"string","enum":["disabled","enabled","enabled_with_disclosure"]},"transcriptPolicy":{"type":"string","enum":["disabled","enabled","enabled_with_disclosure"]},"lastComplianceReviewAt":{"type":["string","null"],"format":"date-time"}},"required":["processingRegion","dpaStatus","crossBorderTransferMechanism","subprocessorVersion","recordingPolicy","transcriptPolicy","lastComplianceReviewAt"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","slug","status","countryCode","defaultLocale","defaultTimezone","sector","dispatchPaused","maxConcurrentCalls","budgetHardCap","budgetSpent","compliance","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/tenant/safety":{"patch":{"operationId":"updateTenantSafety","summary":"Update kill switch / budget / concurrency","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer","minimum":1,"maximum":1000},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ten_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["active","suspended","closed"]},"countryCode":{"type":"string","minLength":2,"maxLength":2},"defaultLocale":{"type":"string"},"defaultTimezone":{"type":"string","minLength":1,"maxLength":64},"sector":{"type":["string","null"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"compliance":{"type":"object","properties":{"processingRegion":{"type":["string","null"]},"dpaStatus":{"type":["string","null"],"enum":["not_signed","pending","signed",null]},"crossBorderTransferMechanism":{"type":["string","null"]},"subprocessorVersion":{"type":["string","null"]},"recordingPolicy":{"type":"string","enum":["disabled","enabled","enabled_with_disclosure"]},"transcriptPolicy":{"type":"string","enum":["disabled","enabled","enabled_with_disclosure"]},"lastComplianceReviewAt":{"type":["string","null"],"format":"date-time"}},"required":["processingRegion","dpaStatus","crossBorderTransferMechanism","subprocessorVersion","recordingPolicy","transcriptPolicy","lastComplianceReviewAt"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","slug","status","countryCode","defaultLocale","defaultTimezone","sector","dispatchPaused","maxConcurrentCalls","budgetHardCap","budgetSpent","compliance","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/tenant/retention":{"get":{"operationId":"getTenantRetention","summary":"How long each class of the account's data is kept","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"compliance:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"recording":{"type":"object","properties":{"days":{"type":"integer"},"accountDays":{"type":["integer","null"]},"platformDays":{"type":"integer"},"min":{"type":"integer"},"max":{"type":"integer"}},"required":["days","accountDays","platformDays","min","max"]},"periods":{"type":"object","properties":{"callRecordDays":{"type":"integer"},"trEvidenceDays":{"type":"integer"},"transcriptDays":{"type":"integer"},"leadDays":{"type":"integer"},"providerPayloadDays":{"type":"integer"},"auditLogDays":{"type":"integer"},"accountClosureDays":{"type":"integer"},"billingDays":{"type":"integer"},"backupDays":{"type":"integer"}},"required":["callRecordDays","trEvidenceDays","transcriptDays","leadDays","providerPayloadDays","auditLogDays","accountClosureDays","billingDays","backupDays"]},"deletion":{"type":"object","properties":{"live":{"type":"boolean"}},"required":["live"]}},"required":["recording","periods","deletion"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"operationId":"updateTenantRetention","summary":"Set the account's recording retention period","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"compliance:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recordingDays":{"type":["integer","null"],"minimum":30,"maximum":365}},"required":["recordingDays"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"recording":{"type":"object","properties":{"days":{"type":"integer"},"accountDays":{"type":["integer","null"]},"platformDays":{"type":"integer"},"min":{"type":"integer"},"max":{"type":"integer"}},"required":["days","accountDays","platformDays","min","max"]},"periods":{"type":"object","properties":{"callRecordDays":{"type":"integer"},"trEvidenceDays":{"type":"integer"},"transcriptDays":{"type":"integer"},"leadDays":{"type":"integer"},"providerPayloadDays":{"type":"integer"},"auditLogDays":{"type":"integer"},"accountClosureDays":{"type":"integer"},"billingDays":{"type":"integer"},"backupDays":{"type":"integer"}},"required":["callRecordDays","trEvidenceDays","transcriptDays","leadDays","providerPayloadDays","auditLogDays","accountClosureDays","billingDays","backupDays"]},"deletion":{"type":"object","properties":{"live":{"type":"boolean"}},"required":["live"]}},"required":["recording","periods","deletion"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/tenant/legal":{"get":{"operationId":"getTenantLegal","summary":"The Terms of Service and DPA in force, and what the account accepted","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"acceptanceRequired":{"type":"boolean"},"documents":{"type":"array","items":{"type":"object","properties":{"document":{"type":"string","enum":["terms","dpa"]},"version":{"type":"string"},"url":{"type":"string"},"effectiveAt":{"type":["string","null"],"format":"date-time"},"inEffect":{"type":"boolean"},"accepted":{"type":"boolean"},"acceptedAt":{"type":["string","null"],"format":"date-time"}},"required":["document","version","url","effectiveAt","inEffect","accepted","acceptedAt"]}},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lacc_[0-9A-HJKMNP-TV-Z]{26}$"},"document":{"type":"string","enum":["terms","dpa"]},"version":{"type":"string"},"userId":{"type":["string","null"],"pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"userEmail":{"type":["string","null"]},"userName":{"type":["string","null"]},"userRole":{"type":"string","enum":["owner","admin"]},"acceptedAt":{"type":"string","format":"date-time"},"url":{"type":"string"}},"required":["id","document","version","userId","userEmail","userName","userRole","acceptedAt","url"]}}},"required":["acceptanceRequired","documents","history"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/tenant/onboarding":{"get":{"operationId":"getTenantOnboarding","summary":"The account's onboarding record (KYC, FTC SAN, state registrations), its review by CallBoi and any calling suspension","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["missing","incomplete","pending","verified","rejected"]},"current":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^tonb_[0-9A-HJKMNP-TV-Z]{26}$"},"legalName":{"type":"string"},"address":{"type":"string"},"countryCode":{"type":"string"},"registrationNumber":{"type":"string"},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":"string"},"ftcSan":{"type":["string","null"]},"callbackNumber":{"type":["string","null"]},"stateRegistrations":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string","minLength":2,"maxLength":2},"number":{"type":"string","minLength":1,"maxLength":64}},"required":["state","number"]}},"website":{"type":["string","null"]},"useCaseStatement":{"type":["string","null"]},"useCaseLeadFollowUp":{"type":"boolean"},"consentFormUrl":{"type":["string","null"]},"consentTexts":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["version","text"]}},"complete":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}},"submittedByEmail":{"type":["string","null"]},"submittedAt":{"type":"string","format":"date-time"}},"required":["id","legalName","address","countryCode","registrationNumber","contactName","contactEmail","contactPhone","ftcSan","callbackNumber","stateRegistrations","website","useCaseStatement","useCaseLeadFollowUp","consentFormUrl","consentTexts","complete","missing","submittedByEmail","submittedAt"]},"review":{"type":["object","null"],"properties":{"decision":{"type":"string","enum":["verified","rejected"]},"note":{"type":["string","null"]},"reviewedAt":{"type":"string","format":"date-time"}},"required":["decision","note","reviewedAt"]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^tonb_[0-9A-HJKMNP-TV-Z]{26}$"},"submittedAt":{"type":"string","format":"date-time"},"submittedByEmail":{"type":["string","null"]},"status":{"type":"string","enum":["missing","incomplete","pending","verified","rejected"]}},"required":["id","submittedAt","submittedByEmail","status"]}},"callingSuspended":{"type":["object","null"],"properties":{"since":{"type":"string","format":"date-time"}},"required":["since"]}},"required":["status","current","review","history","callingSuspended"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"operationId":"saveTenantOnboarding","summary":"Save the onboarding record as a new revision (owner or admin, dashboard session only); CallBoi verifies it before calls to +1 numbers","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"compliance:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":500},"countryCode":{"type":"string","minLength":2,"maxLength":2},"registrationNumber":{"type":"string","minLength":1,"maxLength":64},"contactName":{"type":"string","minLength":1,"maxLength":200},"contactEmail":{"type":"string","minLength":3,"maxLength":320},"contactPhone":{"type":"string","minLength":8,"maxLength":24},"ftcSan":{"type":["string","null"],"maxLength":20},"callbackNumber":{"type":["string","null"],"maxLength":24},"stateRegistrations":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string","minLength":2,"maxLength":2},"number":{"type":"string","minLength":1,"maxLength":64}},"required":["state","number"]},"maxItems":51},"website":{"type":["string","null"],"maxLength":500},"useCaseStatement":{"type":["string","null"],"maxLength":1000},"useCaseLeadFollowUp":{"type":"boolean"},"consentFormUrl":{"type":["string","null"],"maxLength":500},"consentTexts":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["version","text"]},"maxItems":20}},"required":["legalName","address","countryCode","registrationNumber","contactName","contactEmail","contactPhone"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["missing","incomplete","pending","verified","rejected"]},"current":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^tonb_[0-9A-HJKMNP-TV-Z]{26}$"},"legalName":{"type":"string"},"address":{"type":"string"},"countryCode":{"type":"string"},"registrationNumber":{"type":"string"},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":"string"},"ftcSan":{"type":["string","null"]},"callbackNumber":{"type":["string","null"]},"stateRegistrations":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string","minLength":2,"maxLength":2},"number":{"type":"string","minLength":1,"maxLength":64}},"required":["state","number"]}},"website":{"type":["string","null"]},"useCaseStatement":{"type":["string","null"]},"useCaseLeadFollowUp":{"type":"boolean"},"consentFormUrl":{"type":["string","null"]},"consentTexts":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["version","text"]}},"complete":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}},"submittedByEmail":{"type":["string","null"]},"submittedAt":{"type":"string","format":"date-time"}},"required":["id","legalName","address","countryCode","registrationNumber","contactName","contactEmail","contactPhone","ftcSan","callbackNumber","stateRegistrations","website","useCaseStatement","useCaseLeadFollowUp","consentFormUrl","consentTexts","complete","missing","submittedByEmail","submittedAt"]},"review":{"type":["object","null"],"properties":{"decision":{"type":"string","enum":["verified","rejected"]},"note":{"type":["string","null"]},"reviewedAt":{"type":"string","format":"date-time"}},"required":["decision","note","reviewedAt"]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^tonb_[0-9A-HJKMNP-TV-Z]{26}$"},"submittedAt":{"type":"string","format":"date-time"},"submittedByEmail":{"type":["string","null"]},"status":{"type":"string","enum":["missing","incomplete","pending","verified","rejected"]}},"required":["id","submittedAt","submittedByEmail","status"]}},"callingSuspended":{"type":["object","null"],"properties":{"since":{"type":"string","format":"date-time"}},"required":["since"]}},"required":["status","current","review","history","callingSuspended"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/tenant/legal/acceptances":{"post":{"operationId":"acceptLegalDocument","summary":"Accept the version in force of the Terms of Service or the DPA (owner or admin, dashboard session only)","tags":["Tenants"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"compliance:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"string","enum":["terms","dpa"]},"version":{"type":"string","minLength":1,"maxLength":32}},"required":["document","version"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"acceptanceRequired":{"type":"boolean"},"documents":{"type":"array","items":{"type":"object","properties":{"document":{"type":"string","enum":["terms","dpa"]},"version":{"type":"string"},"url":{"type":"string"},"effectiveAt":{"type":["string","null"],"format":"date-time"},"inEffect":{"type":"boolean"},"accepted":{"type":"boolean"},"acceptedAt":{"type":["string","null"],"format":"date-time"}},"required":["document","version","url","effectiveAt","inEffect","accepted","acceptedAt"]}},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lacc_[0-9A-HJKMNP-TV-Z]{26}$"},"document":{"type":"string","enum":["terms","dpa"]},"version":{"type":"string"},"userId":{"type":["string","null"],"pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"userEmail":{"type":["string","null"]},"userName":{"type":["string","null"]},"userRole":{"type":"string","enum":["owner","admin"]},"acceptedAt":{"type":"string","format":"date-time"},"url":{"type":"string"}},"required":["id","document","version","userId","userEmail","userName","userRole","acceptedAt","url"]}}},"required":["acceptanceRequired","documents","history"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/team":{"get":{"operationId":"listTeam","summary":"List tenant members","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"membershipId":{"type":"string","pattern":"^mem_[0-9A-HJKMNP-TV-Z]{26}$"},"userId":{"type":"string","pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string"},"isSelf":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["membershipId","userId","email","name","role","isSelf","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/team/{membershipId}":{"patch":{"operationId":"updateTeamMemberRole","summary":"Change a member's role","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:manage","parameters":[{"schema":{"type":"string","pattern":"^mem_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"membershipId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","operator","viewer"]}},"required":["role"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"membershipId":{"type":"string","pattern":"^mem_[0-9A-HJKMNP-TV-Z]{26}$"},"userId":{"type":"string","pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string"},"isSelf":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["membershipId","userId","email","name","role","isSelf","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"operationId":"removeTeamMember","summary":"Remove a member from the tenant","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:manage","parameters":[{"schema":{"type":"string","pattern":"^mem_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"membershipId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/team/invitations":{"post":{"operationId":"createTeamInvitation","summary":"Invite a person to the tenant by email","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","enum":["owner","admin","operator","viewer"]}},"required":["email","name","role"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^tinv_[0-9A-HJKMNP-TV-Z]{26}$"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string","format":"date-time"},"invitedByName":{"type":["string","null"]},"delivery":{"type":"object","properties":{"status":{"type":"string","enum":["pending","sending","sent","failed","dead"]},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]}},"required":["status","attempts","lastError"]},"createdAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","email","name","role","status","expiresAt","invitedByName","delivery","createdAt","acceptedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listTeamInvitations","summary":"List invitations and their delivery state","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^tinv_[0-9A-HJKMNP-TV-Z]{26}$"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string","format":"date-time"},"invitedByName":{"type":["string","null"]},"delivery":{"type":"object","properties":{"status":{"type":"string","enum":["pending","sending","sent","failed","dead"]},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]}},"required":["status","attempts","lastError"]},"createdAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","email","name","role","status","expiresAt","invitedByName","delivery","createdAt","acceptedAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/team/invitations/{invitationId}/resend":{"post":{"operationId":"resendTeamInvitation","summary":"Queue another delivery attempt for a pending invitation","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:manage","parameters":[{"schema":{"type":"string","pattern":"^tinv_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"invitationId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^tinv_[0-9A-HJKMNP-TV-Z]{26}$"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string","format":"date-time"},"invitedByName":{"type":["string","null"]},"delivery":{"type":"object","properties":{"status":{"type":"string","enum":["pending","sending","sent","failed","dead"]},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]}},"required":["status","attempts","lastError"]},"createdAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","email","name","role","status","expiresAt","invitedByName","delivery","createdAt","acceptedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/team/invitations/{invitationId}":{"delete":{"operationId":"revokeTeamInvitation","summary":"Revoke a pending invitation","tags":["Team"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"team:manage","parameters":[{"schema":{"type":"string","pattern":"^tinv_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"invitationId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^tinv_[0-9A-HJKMNP-TV-Z]{26}$"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"type":"string","format":"date-time"},"invitedByName":{"type":["string","null"]},"delivery":{"type":"object","properties":{"status":{"type":"string","enum":["pending","sending","sent","failed","dead"]},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]}},"required":["status","attempts","lastError"]},"createdAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","email","name","role","status","expiresAt","invitedByName","delivery","createdAt","acceptedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-clients":{"post":{"operationId":"createApiClient","summary":"Create an API key (returned once)","tags":["API Clients"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"rateLimitPerMinute":{"type":"integer","minimum":1,"maximum":10000,"default":120},"maxCallsPerDay":{"type":["integer","null"],"minimum":1,"maximum":100000}},"required":["name","scopes"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"apiClient":{"type":"object","properties":{"id":{"type":"string","pattern":"^apic_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":"integer"},"maxCallsPerDay":{"type":["integer","null"]},"createdByUserId":{"type":["string","null"],"pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"revokedAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","keyPrefix","scopes","rateLimitPerMinute","maxCallsPerDay","createdByUserId","revokedAt","lastUsedAt","createdAt"]},"token":{"type":"string"}},"required":["apiClient","token"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listApiClients","summary":"List API clients","tags":["API Clients"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^apic_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":"integer"},"maxCallsPerDay":{"type":["integer","null"]},"createdByUserId":{"type":["string","null"],"pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"revokedAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","keyPrefix","scopes","rateLimitPerMinute","maxCallsPerDay","createdByUserId","revokedAt","lastUsedAt","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-clients/grantable-scopes":{"get":{"operationId":"listGrantableScopes","summary":"List the scopes the caller may grant a new key","tags":["API Clients"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:manage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}},"required":["scopes"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-clients/{apiClientId}":{"patch":{"operationId":"updateApiClient","summary":"Change an API key's daily call limit","tags":["API Clients"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:manage","parameters":[{"schema":{"type":"string","pattern":"^apic_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"apiClientId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxCallsPerDay":{"type":["integer","null"],"minimum":1,"maximum":100000}},"required":["maxCallsPerDay"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^apic_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":"integer"},"maxCallsPerDay":{"type":["integer","null"]},"createdByUserId":{"type":["string","null"],"pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"revokedAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","keyPrefix","scopes","rateLimitPerMinute","maxCallsPerDay","createdByUserId","revokedAt","lastUsedAt","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-clients/{apiClientId}/revoke":{"post":{"operationId":"revokeApiClient","summary":"Revoke an API key","tags":["API Clients"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:manage","parameters":[{"schema":{"type":"string","pattern":"^apic_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"apiClientId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^apic_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":"integer"},"maxCallsPerDay":{"type":["integer","null"]},"createdByUserId":{"type":["string","null"],"pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"revokedAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","keyPrefix","scopes","rateLimitPerMinute","maxCallsPerDay","createdByUserId","revokedAt","lastUsedAt","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/verified-numbers":{"get":{"operationId":"listVerifiedNumbers","summary":"List the acting member's verified phone numbers","tags":["Verified numbers"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^vpn_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"method":{"type":"string","enum":["sms","email","operator_attested"]},"verifiedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","method","verifiedAt","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/verified-numbers/channels":{"get":{"operationId":"getVerificationChannels","summary":"Whether a verification code can be sent by SMS now","tags":["Verified numbers"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sms":{"type":"boolean"},"email":{"type":"boolean"}},"required":["sms","email"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/verified-numbers/verifications":{"post":{"operationId":"startPhoneVerification","summary":"Send a 6-digit code by SMS to a number to verify it","tags":["Verified numbers"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"channel":{"type":"string","enum":["sms","email"]},"locale":{"type":"string","enum":["tr","en"]}},"required":["phone"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^pver_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"channel":{"type":"string","enum":["sms","email"]},"expiresAt":{"type":"string","format":"date-time"},"resendAvailableAt":{"type":"string","format":"date-time"},"attemptsLeft":{"type":"integer","minimum":0}},"required":["id","phone","channel","expiresAt","resendAvailableAt","attemptsLeft"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/verified-numbers/verifications/{verificationId}/confirm":{"post":{"operationId":"confirmPhoneVerification","summary":"Confirm a number with the code it received","tags":["Verified numbers"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","parameters":[{"schema":{"type":"string","pattern":"^pver_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"verificationId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^vpn_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"method":{"type":"string","enum":["sms","email","operator_attested"]},"verifiedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","method","verifiedAt","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/verified-numbers/{verifiedNumberId}":{"delete":{"operationId":"revokeVerifiedNumber","summary":"Remove one of your verified numbers","tags":["Verified numbers"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"tenant:read","parameters":[{"schema":{"type":"string","pattern":"^vpn_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"verifiedNumberId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^vpn_[0-9A-HJKMNP-TV-Z]{26}$"},"revoked":{"type":"boolean","enum":[true]}},"required":["id","revoked"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/oauth-grants":{"get":{"operationId":"listOAuthGrants","summary":"List connected apps (OAuth grants)","tags":["Connected Apps"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^ogr_[0-9A-HJKMNP-TV-Z]{26}$"},"client":{"type":"object","properties":{"id":{"type":"string","pattern":"^ocl_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"blocked":{"type":"boolean"}},"required":["id","name","blocked"]},"user":{"type":"object","properties":{"id":{"type":"string","pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"scopes":{"type":"array","items":{"type":"string"}},"maxCallsPerDay":{"type":["integer","null"]},"rateLimitPerMinute":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"revokedReason":{"type":["string","null"],"enum":["revoked","refresh_token_reuse","code_reuse",null]}},"required":["id","client","user","scopes","maxCallsPerDay","rateLimitPerMinute","createdAt","lastUsedAt","revokedAt","revokedReason"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/oauth-grants/{grantId}":{"patch":{"operationId":"updateOAuthGrant","summary":"Change a connected app's daily call limit","tags":["Connected Apps"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:manage","parameters":[{"schema":{"type":"string","pattern":"^ogr_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"grantId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"maxCallsPerDay":{"type":["integer","null"],"minimum":1,"maximum":100000}},"required":["maxCallsPerDay"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ogr_[0-9A-HJKMNP-TV-Z]{26}$"},"client":{"type":"object","properties":{"id":{"type":"string","pattern":"^ocl_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"blocked":{"type":"boolean"}},"required":["id","name","blocked"]},"user":{"type":"object","properties":{"id":{"type":"string","pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"scopes":{"type":"array","items":{"type":"string"}},"maxCallsPerDay":{"type":["integer","null"]},"rateLimitPerMinute":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"revokedReason":{"type":["string","null"],"enum":["revoked","refresh_token_reuse","code_reuse",null]}},"required":["id","client","user","scopes","maxCallsPerDay","rateLimitPerMinute","createdAt","lastUsedAt","revokedAt","revokedReason"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/oauth-grants/{grantId}/revoke":{"post":{"operationId":"revokeOAuthGrant","summary":"Revoke a connected app","tags":["Connected Apps"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"api-clients:manage","parameters":[{"schema":{"type":"string","pattern":"^ogr_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"grantId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ogr_[0-9A-HJKMNP-TV-Z]{26}$"},"client":{"type":"object","properties":{"id":{"type":"string","pattern":"^ocl_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"blocked":{"type":"boolean"}},"required":["id","name","blocked"]},"user":{"type":"object","properties":{"id":{"type":"string","pattern":"^usr_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},"scopes":{"type":"array","items":{"type":"string"}},"maxCallsPerDay":{"type":["integer","null"]},"rateLimitPerMinute":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"revokedReason":{"type":["string","null"],"enum":["revoked","refresh_token_reuse","code_reuse",null]}},"required":["id","client","user","scopes","maxCallsPerDay","rateLimitPerMinute","createdAt","lastUsedAt","revokedAt","revokedReason"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-connections":{"post":{"operationId":"createProviderConnection","summary":"Create a voice provider connection","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerKind":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":120},"credentials":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"maxLength":500},"telnyxApiKey":{"type":"string","minLength":1,"maxLength":500}},"required":["apiKey"]},"maxConcurrentCalls":{"type":"integer","minimum":1,"maximum":500,"default":10},"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"default":[]}},"required":["providerKind","name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"providerKind":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"hasCredentials":{"type":"boolean"},"hasTelnyxApiKey":{"type":"boolean"},"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"callerIdsVerifiedAt":{"type":["string","null"],"format":"date-time"},"callerIdVerification":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"owned":{"type":"boolean"},"inboundAgent":{"type":"boolean"}},"required":["phone","owned","inboundAgent"]}},"healthy":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","providerKind","name","status","dispatchPaused","maxConcurrentCalls","hasCredentials","hasTelnyxApiKey","callerIds","callerIdsVerifiedAt","callerIdVerification","healthy","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listProviderConnections","summary":"List provider connections","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"providerKind":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"hasCredentials":{"type":"boolean"},"hasTelnyxApiKey":{"type":"boolean"},"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"callerIdsVerifiedAt":{"type":["string","null"],"format":"date-time"},"callerIdVerification":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"owned":{"type":"boolean"},"inboundAgent":{"type":"boolean"}},"required":["phone","owned","inboundAgent"]}},"healthy":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","providerKind","name","status","dispatchPaused","maxConcurrentCalls","hasCredentials","hasTelnyxApiKey","callerIds","callerIdsVerifiedAt","callerIdVerification","healthy","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-catalog":{"get":{"operationId":"getProviderCatalog","summary":"Available voice providers and their capabilities","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"displayName":{"type":"string"},"requiresCredentials":{"type":"boolean"},"capabilities":{"type":"object","properties":{"kind":{"type":"string"},"displayName":{"type":"string"},"supportsScheduling":{"type":"boolean"},"supportsBatch":{"type":"boolean"},"supportsWarmTransfer":{"type":"boolean"},"supportsRecording":{"type":"boolean"},"supportsTranscripts":{"type":"boolean"},"supportsVoicemailDetection":{"type":"boolean"},"supportsCallerIdSelection":{"type":"boolean"},"providerManagedAgents":{"type":"boolean"}},"required":["kind","displayName","supportsScheduling","supportsBatch","supportsWarmTransfer","supportsRecording","supportsTranscripts","supportsVoicemailDetection","supportsCallerIdSelection","providerManagedAgents"]}},"required":["kind","displayName","requiresCredentials","capabilities"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-connections/{connectionId}/voices":{"get":{"operationId":"listProviderVoices","summary":"Voices an agent can use on this connection, from the provider's catalogue","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:read","parameters":[{"schema":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"connectionId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"engine":{"type":["string","null"]},"gender":{"type":["string","null"]},"accent":{"type":["string","null"]},"age":{"type":["string","null"]},"previewUrl":{"type":["string","null"]}},"required":["id","name","engine","gender","accent","age","previewUrl"]}},"librarySearch":{"type":"boolean"}},"required":["voices","librarySearch"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-connections/{connectionId}/voice-library":{"get":{"operationId":"searchVoiceLibrary","summary":"Search the provider's shared voice library (voices not yet on the account)","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:read","parameters":[{"schema":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"connectionId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":40},"required":false,"name":"engine","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"providerVoiceId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"engine":{"type":["string","null"]},"publicUserId":{"type":["string","null"]}},"required":["providerVoiceId","name","description","engine","publicUserId"]}}},"required":["voices"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"operationId":"addLibraryVoice","summary":"Add a shared library voice to the provider account, so agents can use it","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerVoiceId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"engine":{"type":["string","null"],"minLength":1,"maxLength":40,"default":null},"publicUserId":{"type":["string","null"],"minLength":1,"maxLength":200,"default":null}},"required":["providerVoiceId","name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"engine":{"type":["string","null"]},"gender":{"type":["string","null"]},"accent":{"type":["string","null"]},"age":{"type":["string","null"]},"previewUrl":{"type":["string","null"]}},"required":["id","name","engine","gender","accent","age","previewUrl"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-connections/{connectionId}/safety":{"patch":{"operationId":"updateProviderConnectionSafety","summary":"Pause/disable a provider connection","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:manage","parameters":[{"schema":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dispatchPaused":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"providerKind":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"hasCredentials":{"type":"boolean"},"hasTelnyxApiKey":{"type":"boolean"},"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"callerIdsVerifiedAt":{"type":["string","null"],"format":"date-time"},"callerIdVerification":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"owned":{"type":"boolean"},"inboundAgent":{"type":"boolean"}},"required":["phone","owned","inboundAgent"]}},"healthy":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","providerKind","name","status","dispatchPaused","maxConcurrentCalls","hasCredentials","hasTelnyxApiKey","callerIds","callerIdsVerifiedAt","callerIdVerification","healthy","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-connections/{connectionId}/caller-ids":{"patch":{"operationId":"setProviderConnectionCallerIds","summary":"Replace the caller ID (one at most), checked against the provider account's own number list","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:manage","parameters":[{"schema":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"maxItems":5}},"required":["callerIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"providerKind":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"hasCredentials":{"type":"boolean"},"hasTelnyxApiKey":{"type":"boolean"},"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"callerIdsVerifiedAt":{"type":["string","null"],"format":"date-time"},"callerIdVerification":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"owned":{"type":"boolean"},"inboundAgent":{"type":"boolean"}},"required":["phone","owned","inboundAgent"]}},"healthy":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","providerKind","name","status","dispatchPaused","maxConcurrentCalls","hasCredentials","hasTelnyxApiKey","callerIds","callerIdsVerifiedAt","callerIdVerification","healthy","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/provider-connections/{connectionId}/carrier-key":{"patch":{"operationId":"setProviderConnectionCarrierKey","summary":"Add, replace or remove the Telnyx API key of a Retell connection (read-only use: call costs and balance)","tags":["Provider Connections"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"provider-connections:manage","parameters":[{"schema":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"connectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"telnyxApiKey":{"type":["string","null"],"minLength":1,"maxLength":500}},"required":["telnyxApiKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"providerKind":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"dispatchPaused":{"type":"boolean"},"maxConcurrentCalls":{"type":"integer"},"hasCredentials":{"type":"boolean"},"hasTelnyxApiKey":{"type":"boolean"},"callerIds":{"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"callerIdsVerifiedAt":{"type":["string","null"],"format":"date-time"},"callerIdVerification":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string"},"owned":{"type":"boolean"},"inboundAgent":{"type":"boolean"}},"required":["phone","owned","inboundAgent"]}},"healthy":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","providerKind","name","status","dispatchPaused","maxConcurrentCalls","hasCredentials","hasTelnyxApiKey","callerIds","callerIdsVerifiedAt","callerIdVerification","healthy","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents":{"post":{"operationId":"createAgent","summary":"Create an agent","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"countryCode":{"type":"string","minLength":1,"maxLength":2},"usState":{"type":["string","null"],"maxLength":2},"language":{"type":"string","minLength":1,"maxLength":20}},"required":["name","countryCode","language"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"description":{"type":["string","null"]},"countryCode":{"type":"string"},"usState":{"type":["string","null"]},"language":{"type":"string"},"publishedVersionId":{"type":["string","null"],"pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","countryCode","usState","language","publishedVersionId","createdAt","updatedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listAgents","summary":"List agents","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"description":{"type":["string","null"]},"countryCode":{"type":"string"},"usState":{"type":["string","null"]},"language":{"type":"string"},"publishedVersionId":{"type":["string","null"],"pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","countryCode","usState","language","publishedVersionId","createdAt","updatedAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{agentId}":{"get":{"operationId":"getAgent","summary":"Get an agent","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:read","parameters":[{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"description":{"type":["string","null"]},"countryCode":{"type":"string"},"usState":{"type":["string","null"]},"language":{"type":"string"},"publishedVersionId":{"type":["string","null"],"pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","countryCode","usState","language","publishedVersionId","createdAt","updatedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"operationId":"deleteAgent","summary":"Delete an agent (its calls keep their history)","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"deletedAt":{"type":"string","format":"date-time"},"draftCampaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["id","name","deletedAt","draftCampaigns"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{agentId}/region":{"patch":{"operationId":"updateAgentRegion","summary":"Change an agent's country, state and language","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"countryCode":{"type":"string","minLength":1,"maxLength":2},"usState":{"type":["string","null"],"maxLength":2},"language":{"type":"string","minLength":1,"maxLength":20}},"required":["countryCode","language"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"description":{"type":["string","null"]},"countryCode":{"type":"string"},"usState":{"type":["string","null"]},"language":{"type":"string"},"publishedVersionId":{"type":["string","null"],"pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","countryCode","usState","language","publishedVersionId","createdAt","updatedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{agentId}/versions":{"post":{"operationId":"createAgentVersion","summary":"Create an immutable agent version (draft)","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1,"maxLength":20000},"language":{"type":"string","minLength":1,"maxLength":20},"voice":{"type":"string","minLength":1,"maxLength":60},"firstMessage":{"type":["string","null"],"maxLength":2000,"default":null},"disclosureTemplateId":{"type":["string","null"],"default":null},"transferEnabled":{"type":"boolean","default":false},"transferDestination":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{7,14}$","default":null},"maxCallDurationSeconds":{"type":"integer","minimum":10,"maximum":3600,"default":600},"recordingPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"transcriptPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"knowledgeSourceIds":{"type":"array","items":{"type":"string","pattern":"^ksrc_[0-9A-HJKMNP-TV-Z]{26}$"},"default":[]},"knowledgeIntentIds":{"type":"array","items":{"type":"string","pattern":"^intn_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":500,"default":[]},"knowledgeFactIds":{"type":"array","items":{"type":"string","pattern":"^fact_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":2000,"default":[]},"toolAllowlist":{"type":"array","items":{"type":"string"},"default":[]},"retell":{"type":["object","null"],"properties":{"llmModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"llmTier":{"type":["string","null"],"enum":["standard","fast","ultrafast",null]},"llmTemperature":{"type":["number","null"],"minimum":0,"maximum":1},"backupModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"voiceModel":{"type":["string","null"],"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3","sonic-3-latest","sonic-3.5","sonic-3.6","tts-1","gpt-4o-mini-tts","speech-02-turbo","speech-2.8-turbo","s1","s2-pro","s2.1-pro","inworld-tts-2","inworld-tts-2-flash",null]},"voiceSpeed":{"type":["number","null"],"minimum":0.5,"maximum":2},"voiceTemperature":{"type":["number","null"],"minimum":0,"maximum":2},"responsiveness":{"type":["number","null"],"minimum":0,"maximum":1},"interruptionSensitivity":{"type":["number","null"],"minimum":0,"maximum":1},"enableBackchannel":{"type":["boolean","null"]},"ambientSound":{"type":["string","null"],"enum":["coffee-shop","convention-hall","summer-outdoor","mountain-outdoor","static-noise","call-center",null]},"endCallAfterSilenceSeconds":{"type":["integer","null"],"minimum":10,"maximum":3600},"sttMode":{"type":["string","null"],"enum":["fast","accurate",null]},"denoisingMode":{"type":["string","null"],"enum":["no-denoise","noise-cancellation","noise-and-background-speech-cancellation",null]},"startSpeaker":{"type":["string","null"],"enum":["user","agent",null]},"beginAfterUserSilenceMs":{"type":["integer","null"],"minimum":500,"maximum":30000},"boostedKeywords":{"type":["array","null"],"items":{"type":"string","minLength":2,"maxLength":60},"maxItems":30}},"additionalProperties":false},"kind":{"type":["string","null"],"enum":["custom","sales","support","hybrid",null]},"tools":{"type":["object","null"],"properties":{"lookupKnowledge":{"type":"boolean"},"logLeadOutcome":{"type":"boolean"},"scheduleCallback":{"type":"boolean"},"sendFollowup":{"type":"boolean"},"checkOfferAvailability":{"type":"boolean"}}}},"required":["systemPrompt","language","voice"]},"translationApprovals":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["systemPrompt","firstMessage"]},"original":{"type":"string","minLength":1,"maxLength":20000},"translated":{"type":"string","minLength":1,"maxLength":20000},"sourceLanguage":{"type":"string","minLength":2,"maxLength":20}},"required":["field","original","translated","sourceLanguage"]},"maxItems":5}},"required":["config"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"agentId":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","published","retired"]},"config":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1,"maxLength":20000},"language":{"type":"string","minLength":1,"maxLength":20},"voice":{"type":"string","minLength":1,"maxLength":60},"firstMessage":{"type":["string","null"],"maxLength":2000,"default":null},"disclosureTemplateId":{"type":["string","null"],"default":null},"transferEnabled":{"type":"boolean","default":false},"transferDestination":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{7,14}$","default":null},"maxCallDurationSeconds":{"type":"integer","minimum":10,"maximum":3600,"default":600},"recordingPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"transcriptPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"knowledgeSourceIds":{"type":"array","items":{"type":"string","pattern":"^ksrc_[0-9A-HJKMNP-TV-Z]{26}$"},"default":[]},"knowledgeIntentIds":{"type":"array","items":{"type":"string","pattern":"^intn_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":500,"default":[]},"knowledgeFactIds":{"type":"array","items":{"type":"string","pattern":"^fact_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":2000,"default":[]},"toolAllowlist":{"type":"array","items":{"type":"string"},"default":[]},"retell":{"type":["object","null"],"properties":{"llmModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"llmTier":{"type":["string","null"],"enum":["standard","fast","ultrafast",null]},"llmTemperature":{"type":["number","null"],"minimum":0,"maximum":1},"backupModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"voiceModel":{"type":["string","null"],"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3","sonic-3-latest","sonic-3.5","sonic-3.6","tts-1","gpt-4o-mini-tts","speech-02-turbo","speech-2.8-turbo","s1","s2-pro","s2.1-pro","inworld-tts-2","inworld-tts-2-flash",null]},"voiceSpeed":{"type":["number","null"],"minimum":0.5,"maximum":2},"voiceTemperature":{"type":["number","null"],"minimum":0,"maximum":2},"responsiveness":{"type":["number","null"],"minimum":0,"maximum":1},"interruptionSensitivity":{"type":["number","null"],"minimum":0,"maximum":1},"enableBackchannel":{"type":["boolean","null"]},"ambientSound":{"type":["string","null"],"enum":["coffee-shop","convention-hall","summer-outdoor","mountain-outdoor","static-noise","call-center",null]},"endCallAfterSilenceSeconds":{"type":["integer","null"],"minimum":10,"maximum":3600},"sttMode":{"type":["string","null"],"enum":["fast","accurate",null]},"denoisingMode":{"type":["string","null"],"enum":["no-denoise","noise-cancellation","noise-and-background-speech-cancellation",null]},"startSpeaker":{"type":["string","null"],"enum":["user","agent",null]},"beginAfterUserSilenceMs":{"type":["integer","null"],"minimum":500,"maximum":30000},"boostedKeywords":{"type":["array","null"],"items":{"type":"string","minLength":2,"maxLength":60},"maxItems":30}},"additionalProperties":false},"kind":{"type":["string","null"],"enum":["custom","sales","support","hybrid",null]},"tools":{"type":["object","null"],"properties":{"lookupKnowledge":{"type":"boolean"},"logLeadOutcome":{"type":"boolean"},"scheduleCallback":{"type":"boolean"},"sendFollowup":{"type":"boolean"},"checkOfferAvailability":{"type":"boolean"}}}},"required":["systemPrompt","language","voice"]},"createdAt":{"type":"string","format":"date-time"},"publishedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","agentId","version","status","config","createdAt","publishedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listAgentVersions","summary":"List agent versions","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:read","parameters":[{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"agentId":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","published","retired"]},"config":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1,"maxLength":20000},"language":{"type":"string","minLength":1,"maxLength":20},"voice":{"type":"string","minLength":1,"maxLength":60},"firstMessage":{"type":["string","null"],"maxLength":2000,"default":null},"disclosureTemplateId":{"type":["string","null"],"default":null},"transferEnabled":{"type":"boolean","default":false},"transferDestination":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{7,14}$","default":null},"maxCallDurationSeconds":{"type":"integer","minimum":10,"maximum":3600,"default":600},"recordingPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"transcriptPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"knowledgeSourceIds":{"type":"array","items":{"type":"string","pattern":"^ksrc_[0-9A-HJKMNP-TV-Z]{26}$"},"default":[]},"knowledgeIntentIds":{"type":"array","items":{"type":"string","pattern":"^intn_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":500,"default":[]},"knowledgeFactIds":{"type":"array","items":{"type":"string","pattern":"^fact_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":2000,"default":[]},"toolAllowlist":{"type":"array","items":{"type":"string"},"default":[]},"retell":{"type":["object","null"],"properties":{"llmModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"llmTier":{"type":["string","null"],"enum":["standard","fast","ultrafast",null]},"llmTemperature":{"type":["number","null"],"minimum":0,"maximum":1},"backupModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"voiceModel":{"type":["string","null"],"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3","sonic-3-latest","sonic-3.5","sonic-3.6","tts-1","gpt-4o-mini-tts","speech-02-turbo","speech-2.8-turbo","s1","s2-pro","s2.1-pro","inworld-tts-2","inworld-tts-2-flash",null]},"voiceSpeed":{"type":["number","null"],"minimum":0.5,"maximum":2},"voiceTemperature":{"type":["number","null"],"minimum":0,"maximum":2},"responsiveness":{"type":["number","null"],"minimum":0,"maximum":1},"interruptionSensitivity":{"type":["number","null"],"minimum":0,"maximum":1},"enableBackchannel":{"type":["boolean","null"]},"ambientSound":{"type":["string","null"],"enum":["coffee-shop","convention-hall","summer-outdoor","mountain-outdoor","static-noise","call-center",null]},"endCallAfterSilenceSeconds":{"type":["integer","null"],"minimum":10,"maximum":3600},"sttMode":{"type":["string","null"],"enum":["fast","accurate",null]},"denoisingMode":{"type":["string","null"],"enum":["no-denoise","noise-cancellation","noise-and-background-speech-cancellation",null]},"startSpeaker":{"type":["string","null"],"enum":["user","agent",null]},"beginAfterUserSilenceMs":{"type":["integer","null"],"minimum":500,"maximum":30000},"boostedKeywords":{"type":["array","null"],"items":{"type":"string","minLength":2,"maxLength":60},"maxItems":30}},"additionalProperties":false},"kind":{"type":["string","null"],"enum":["custom","sales","support","hybrid",null]},"tools":{"type":["object","null"],"properties":{"lookupKnowledge":{"type":"boolean"},"logLeadOutcome":{"type":"boolean"},"scheduleCallback":{"type":"boolean"},"sendFollowup":{"type":"boolean"},"checkOfferAvailability":{"type":"boolean"}}}},"required":["systemPrompt","language","voice"]},"createdAt":{"type":"string","format":"date-time"},"publishedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","agentId","version","status","config","createdAt","publishedAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{agentId}/versions/upgrade-to-template/preview":{"post":{"operationId":"previewAgentTemplateUpgrade","summary":"Propose moving a custom agent to a template kind (nothing is saved)","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["sales","support","hybrid"]},"fromVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"businessText":{"type":"string","minLength":1,"maxLength":20000}},"required":["kind"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sourceVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"sourceVersion":{"type":"integer"},"kind":{"type":"string","enum":["sales","support","hybrid"]},"businessText":{"type":"string"},"dropped":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string"},"reason":{"type":"string","enum":["voice_core","role","opt_out","identity"]}},"required":["heading","reason"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["no_template_text","empty_business_text","unresolved_placeholder","content_language_mismatch"]},"names":{"type":"array","items":{"type":"string"}}},"required":["code"]}}},"required":["sourceVersionId","sourceVersion","kind","businessText","dropped","warnings"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{agentId}/versions/upgrade-to-template":{"post":{"operationId":"upgradeAgentToTemplate","summary":"Create a draft version on a template kind from a custom one (nothing is published)","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["sales","support","hybrid"]},"fromVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"businessText":{"type":"string","minLength":1,"maxLength":20000}},"required":["kind"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"agentId":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","published","retired"]},"config":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1,"maxLength":20000},"language":{"type":"string","minLength":1,"maxLength":20},"voice":{"type":"string","minLength":1,"maxLength":60},"firstMessage":{"type":["string","null"],"maxLength":2000,"default":null},"disclosureTemplateId":{"type":["string","null"],"default":null},"transferEnabled":{"type":"boolean","default":false},"transferDestination":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{7,14}$","default":null},"maxCallDurationSeconds":{"type":"integer","minimum":10,"maximum":3600,"default":600},"recordingPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"transcriptPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"knowledgeSourceIds":{"type":"array","items":{"type":"string","pattern":"^ksrc_[0-9A-HJKMNP-TV-Z]{26}$"},"default":[]},"knowledgeIntentIds":{"type":"array","items":{"type":"string","pattern":"^intn_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":500,"default":[]},"knowledgeFactIds":{"type":"array","items":{"type":"string","pattern":"^fact_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":2000,"default":[]},"toolAllowlist":{"type":"array","items":{"type":"string"},"default":[]},"retell":{"type":["object","null"],"properties":{"llmModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"llmTier":{"type":["string","null"],"enum":["standard","fast","ultrafast",null]},"llmTemperature":{"type":["number","null"],"minimum":0,"maximum":1},"backupModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"voiceModel":{"type":["string","null"],"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3","sonic-3-latest","sonic-3.5","sonic-3.6","tts-1","gpt-4o-mini-tts","speech-02-turbo","speech-2.8-turbo","s1","s2-pro","s2.1-pro","inworld-tts-2","inworld-tts-2-flash",null]},"voiceSpeed":{"type":["number","null"],"minimum":0.5,"maximum":2},"voiceTemperature":{"type":["number","null"],"minimum":0,"maximum":2},"responsiveness":{"type":["number","null"],"minimum":0,"maximum":1},"interruptionSensitivity":{"type":["number","null"],"minimum":0,"maximum":1},"enableBackchannel":{"type":["boolean","null"]},"ambientSound":{"type":["string","null"],"enum":["coffee-shop","convention-hall","summer-outdoor","mountain-outdoor","static-noise","call-center",null]},"endCallAfterSilenceSeconds":{"type":["integer","null"],"minimum":10,"maximum":3600},"sttMode":{"type":["string","null"],"enum":["fast","accurate",null]},"denoisingMode":{"type":["string","null"],"enum":["no-denoise","noise-cancellation","noise-and-background-speech-cancellation",null]},"startSpeaker":{"type":["string","null"],"enum":["user","agent",null]},"beginAfterUserSilenceMs":{"type":["integer","null"],"minimum":500,"maximum":30000},"boostedKeywords":{"type":["array","null"],"items":{"type":"string","minLength":2,"maxLength":60},"maxItems":30}},"additionalProperties":false},"kind":{"type":["string","null"],"enum":["custom","sales","support","hybrid",null]},"tools":{"type":["object","null"],"properties":{"lookupKnowledge":{"type":"boolean"},"logLeadOutcome":{"type":"boolean"},"scheduleCallback":{"type":"boolean"},"sendFollowup":{"type":"boolean"},"checkOfferAvailability":{"type":"boolean"}}}},"required":["systemPrompt","language","voice"]},"createdAt":{"type":"string","format":"date-time"},"publishedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","agentId","version","status","config","createdAt","publishedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agent-versions":{"get":{"operationId":"listAgentVersionNames","summary":"Every agent version with its agent's name","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"agentId":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"agentName":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","published","retired"]},"agentDeleted":{"type":"boolean"}},"required":["id","agentId","agentName","version","status","agentDeleted"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/retell-models":{"get":{"operationId":"listRetellModels","summary":"The Retell models enabled for agent versions, and the platform default","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"label":{"type":"string"},"tiers":{"type":"array","items":{"type":"string","enum":["standard","fast","ultrafast"]}}},"required":["model","label","tiers"]}},"defaultModel":{"type":["string","null"]},"defaultTier":{"type":["string","null"]}},"required":["models","defaultModel","defaultTier"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/agents/{agentId}/versions/{versionId}/publish":{"post":{"operationId":"publishAgentVersion","summary":"Publish an agent version (freezes its config)","tags":["Agents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"agents:publish","parameters":[{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"agentId":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"version":{"type":"integer"},"status":{"type":"string","enum":["draft","published","retired"]},"config":{"type":"object","properties":{"systemPrompt":{"type":"string","minLength":1,"maxLength":20000},"language":{"type":"string","minLength":1,"maxLength":20},"voice":{"type":"string","minLength":1,"maxLength":60},"firstMessage":{"type":["string","null"],"maxLength":2000,"default":null},"disclosureTemplateId":{"type":["string","null"],"default":null},"transferEnabled":{"type":"boolean","default":false},"transferDestination":{"type":["string","null"],"pattern":"^\\+[1-9]\\d{7,14}$","default":null},"maxCallDurationSeconds":{"type":"integer","minimum":10,"maximum":3600,"default":600},"recordingPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"transcriptPolicyOverride":{"type":["string","null"],"enum":["disabled","enabled","enabled_with_disclosure",null],"default":null},"knowledgeSourceIds":{"type":"array","items":{"type":"string","pattern":"^ksrc_[0-9A-HJKMNP-TV-Z]{26}$"},"default":[]},"knowledgeIntentIds":{"type":"array","items":{"type":"string","pattern":"^intn_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":500,"default":[]},"knowledgeFactIds":{"type":"array","items":{"type":"string","pattern":"^fact_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":2000,"default":[]},"toolAllowlist":{"type":"array","items":{"type":"string"},"default":[]},"retell":{"type":["object","null"],"properties":{"llmModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"llmTier":{"type":["string","null"],"enum":["standard","fast","ultrafast",null]},"llmTemperature":{"type":["number","null"],"minimum":0,"maximum":1},"backupModel":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"},"voiceModel":{"type":["string","null"],"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3","sonic-3-latest","sonic-3.5","sonic-3.6","tts-1","gpt-4o-mini-tts","speech-02-turbo","speech-2.8-turbo","s1","s2-pro","s2.1-pro","inworld-tts-2","inworld-tts-2-flash",null]},"voiceSpeed":{"type":["number","null"],"minimum":0.5,"maximum":2},"voiceTemperature":{"type":["number","null"],"minimum":0,"maximum":2},"responsiveness":{"type":["number","null"],"minimum":0,"maximum":1},"interruptionSensitivity":{"type":["number","null"],"minimum":0,"maximum":1},"enableBackchannel":{"type":["boolean","null"]},"ambientSound":{"type":["string","null"],"enum":["coffee-shop","convention-hall","summer-outdoor","mountain-outdoor","static-noise","call-center",null]},"endCallAfterSilenceSeconds":{"type":["integer","null"],"minimum":10,"maximum":3600},"sttMode":{"type":["string","null"],"enum":["fast","accurate",null]},"denoisingMode":{"type":["string","null"],"enum":["no-denoise","noise-cancellation","noise-and-background-speech-cancellation",null]},"startSpeaker":{"type":["string","null"],"enum":["user","agent",null]},"beginAfterUserSilenceMs":{"type":["integer","null"],"minimum":500,"maximum":30000},"boostedKeywords":{"type":["array","null"],"items":{"type":"string","minLength":2,"maxLength":60},"maxItems":30}},"additionalProperties":false},"kind":{"type":["string","null"],"enum":["custom","sales","support","hybrid",null]},"tools":{"type":["object","null"],"properties":{"lookupKnowledge":{"type":"boolean"},"logLeadOutcome":{"type":"boolean"},"scheduleCallback":{"type":"boolean"},"sendFollowup":{"type":"boolean"},"checkOfferAvailability":{"type":"boolean"}}}},"required":["systemPrompt","language","voice"]},"createdAt":{"type":"string","format":"date-time"},"publishedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","agentId","version","status","config","createdAt","publishedAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/leads":{"post":{"operationId":"createLead","summary":"Create a lead","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":"string","maxLength":200},"locale":{"type":"string","maxLength":20},"timezone":{"type":"string","minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{},"default":{}},"source":{"type":"string","maxLength":120},"consentEvidence":{"type":"object","properties":{"consentTextVersion":{"type":"string","minLength":1,"maxLength":80},"grantedAt":{"type":"string","format":"date-time"},"sourceUrl":{"type":"string","minLength":1,"maxLength":2000},"ipAddress":{"type":"string","maxLength":100},"formId":{"type":"string","minLength":1,"maxLength":200},"requestedByRecipient":{"type":"boolean","default":false}},"required":["consentTextVersion","grantedAt","sourceUrl"]},"dncScrubbedAt":{"type":"string","format":"date-time"},"dncScrubSource":{"type":"string","minLength":1,"maxLength":100},"dncScrubReference":{"type":"string","minLength":1,"maxLength":200},"rndCheckedAt":{"type":"string","format":"date-time"},"rndResult":{"type":"string","enum":["no","yes","no_data"]},"rndSource":{"type":"string","minLength":1,"maxLength":100},"rndReference":{"type":"string","minLength":1,"maxLength":200}},"required":["phone"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{}},"source":{"type":["string","null"]},"dncScrubbedAt":{"type":["string","null"],"format":"date-time"},"dncScrubSource":{"type":["string","null"]},"dncScrubReference":{"type":["string","null"]},"rndCheckedAt":{"type":["string","null"],"format":"date-time"},"rndResult":{"type":["string","null"],"enum":["no","yes","no_data",null]},"rndSource":{"type":["string","null"]},"rndReference":{"type":["string","null"]},"emailOptOutAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","name","locale","timezone","attributes","source","dncScrubbedAt","dncScrubSource","dncScrubReference","rndCheckedAt","rndResult","rndSource","rndReference","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listLeads","summary":"List leads","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{}},"source":{"type":["string","null"]},"dncScrubbedAt":{"type":["string","null"],"format":"date-time"},"dncScrubSource":{"type":["string","null"]},"dncScrubReference":{"type":["string","null"]},"rndCheckedAt":{"type":["string","null"],"format":"date-time"},"rndResult":{"type":["string","null"],"enum":["no","yes","no_data",null]},"rndSource":{"type":["string","null"]},"rndReference":{"type":["string","null"]},"emailOptOutAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","name","locale","timezone","attributes","source","dncScrubbedAt","dncScrubSource","dncScrubReference","rndCheckedAt","rndResult","rndSource","rndReference","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/leads/{leadId}":{"get":{"operationId":"getLead","summary":"Get a lead","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:read","parameters":[{"schema":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"leadId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{}},"source":{"type":["string","null"]},"dncScrubbedAt":{"type":["string","null"],"format":"date-time"},"dncScrubSource":{"type":["string","null"]},"dncScrubReference":{"type":["string","null"]},"rndCheckedAt":{"type":["string","null"],"format":"date-time"},"rndResult":{"type":["string","null"],"enum":["no","yes","no_data",null]},"rndSource":{"type":["string","null"]},"rndReference":{"type":["string","null"]},"emailOptOutAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","name","locale","timezone","attributes","source","dncScrubbedAt","dncScrubSource","dncScrubReference","rndCheckedAt","rndResult","rndSource","rndReference","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/leads/{leadId}/screening":{"post":{"operationId":"recordLeadScreening","summary":"Record a do-not-call scrub or a Reassigned Numbers Database answer for a lead's number","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"leadId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dncScrubbedAt":{"type":"string","format":"date-time"},"dncScrubSource":{"type":"string","minLength":1,"maxLength":100},"dncScrubReference":{"type":"string","minLength":1,"maxLength":200},"rndCheckedAt":{"type":"string","format":"date-time"},"rndResult":{"type":"string","enum":["no","yes","no_data"]},"rndSource":{"type":"string","minLength":1,"maxLength":100},"rndReference":{"type":"string","minLength":1,"maxLength":200}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{}},"source":{"type":["string","null"]},"dncScrubbedAt":{"type":["string","null"],"format":"date-time"},"dncScrubSource":{"type":["string","null"]},"dncScrubReference":{"type":["string","null"]},"rndCheckedAt":{"type":["string","null"],"format":"date-time"},"rndResult":{"type":["string","null"],"enum":["no","yes","no_data",null]},"rndSource":{"type":["string","null"]},"rndReference":{"type":["string","null"]},"emailOptOutAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","name","locale","timezone","attributes","source","dncScrubbedAt","dncScrubSource","dncScrubReference","rndCheckedAt","rndResult","rndSource","rndReference","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/leads/{leadId}/email-opt-out":{"post":{"operationId":"setLeadEmailOptOut","summary":"Record that the person wants no follow-up e-mail; the address they confirmed on a call is suppressed too","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"leadId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{}},"source":{"type":["string","null"]},"dncScrubbedAt":{"type":["string","null"],"format":"date-time"},"dncScrubSource":{"type":["string","null"]},"dncScrubReference":{"type":["string","null"]},"rndCheckedAt":{"type":["string","null"],"format":"date-time"},"rndResult":{"type":["string","null"],"enum":["no","yes","no_data",null]},"rndSource":{"type":["string","null"]},"rndReference":{"type":["string","null"]},"emailOptOutAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","name","locale","timezone","attributes","source","dncScrubbedAt","dncScrubSource","dncScrubReference","rndCheckedAt","rndResult","rndSource","rndReference","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/leads/{leadId}/translation-approvals":{"post":{"operationId":"approveLeadTranslations","summary":"Replace non-English free text on a lead with an English translation the owner approved","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"leadId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvals":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100},"original":{"type":"string","minLength":1,"maxLength":5000},"translated":{"type":"string","minLength":1,"maxLength":5000},"sourceLanguage":{"type":"string","minLength":2,"maxLength":20}},"required":["field","original","translated"]},"minItems":1,"maxItems":20}},"required":["approvals"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"],"minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{}},"source":{"type":["string","null"]},"dncScrubbedAt":{"type":["string","null"],"format":"date-time"},"dncScrubSource":{"type":["string","null"]},"dncScrubReference":{"type":["string","null"]},"rndCheckedAt":{"type":["string","null"],"format":"date-time"},"rndResult":{"type":["string","null"],"enum":["no","yes","no_data",null]},"rndSource":{"type":["string","null"]},"rndReference":{"type":["string","null"]},"emailOptOutAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","name","locale","timezone","attributes","source","dncScrubbedAt","dncScrubSource","dncScrubReference","rndCheckedAt","rndResult","rndSource","rndReference","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/lead-imports":{"post":{"operationId":"importLeads","summary":"Bulk-import leads with optional consent evidence","tags":["Leads"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"leads:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"name":{"type":"string","maxLength":200},"locale":{"type":"string","maxLength":20},"timezone":{"type":"string","minLength":1,"maxLength":64},"attributes":{"type":"object","additionalProperties":{},"default":{}},"source":{"type":"string","maxLength":120},"consentEvidence":{"type":"object","properties":{"consentTextVersion":{"type":"string","minLength":1,"maxLength":80},"grantedAt":{"type":"string","format":"date-time"},"sourceUrl":{"type":"string","minLength":1,"maxLength":2000},"ipAddress":{"type":"string","maxLength":100},"formId":{"type":"string","minLength":1,"maxLength":200},"requestedByRecipient":{"type":"boolean","default":false}},"required":["consentTextVersion","grantedAt","sourceUrl"]},"dncScrubbedAt":{"type":"string","format":"date-time"},"dncScrubSource":{"type":"string","minLength":1,"maxLength":100},"dncScrubReference":{"type":"string","minLength":1,"maxLength":200},"rndCheckedAt":{"type":"string","format":"date-time"},"rndResult":{"type":"string","enum":["no","yes","no_data"]},"rndSource":{"type":"string","minLength":1,"maxLength":100},"rndReference":{"type":"string","minLength":1,"maxLength":200}},"required":["phone"]},"minItems":1,"maxItems":1000},"consent":{"type":"object","properties":{"legalBasis":{"type":"string","minLength":1,"maxLength":80},"source":{"type":"string","minLength":1,"maxLength":120},"channel":{"type":"string","minLength":1,"maxLength":80},"consentTextVersion":{"type":"string","maxLength":80},"scope":{"type":"string","minLength":1,"maxLength":120,"default":"outbound_calls"},"grantedAt":{"type":"string","format":"date-time"},"evidenceRef":{"type":"string","maxLength":500},"externalRef":{"type":"string","maxLength":200}},"required":["legalBasis","source","channel"]}},"required":["leads"]}}}},"responses":{"202":{"description":"Accepted for asynchronous processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"integer"},"rejected":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"reason":{"type":"string"},"code":{"type":"string"}},"required":["index","reason"]}}},"required":["accepted","rejected"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/consents":{"post":{"operationId":"createConsent","summary":"Attach consent / legal-basis evidence to a lead","tags":["Consents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"consents:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"legalBasis":{"type":"string","minLength":1,"maxLength":80},"source":{"type":"string","minLength":1,"maxLength":120},"channel":{"type":"string","minLength":1,"maxLength":80},"consentTextVersion":{"type":"string","maxLength":80},"scope":{"type":"string","minLength":1,"maxLength":120,"default":"outbound_calls"},"grantedAt":{"type":"string","format":"date-time"},"evidenceRef":{"type":"string","maxLength":500},"externalRef":{"type":"string","maxLength":200},"sourceUrl":{"type":"string","maxLength":2000,"format":"uri"},"ipAddress":{"anyOf":[{"type":"string","format":"ip"},{"type":"string","format":"ip"}]},"formId":{"type":"string","minLength":1,"maxLength":200},"requestedByRecipient":{"type":"boolean"}},"required":["leadId","legalBasis","source","channel"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cons_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"legalBasis":{"type":"string"},"source":{"type":"string"},"channel":{"type":"string"},"consentTextVersion":{"type":["string","null"]},"scope":{"type":"string"},"grantedAt":{"type":"string","format":"date-time"},"withdrawnAt":{"type":["string","null"],"format":"date-time"},"evidenceRef":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"importedBy":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"ipAddress":{"type":["string","null"]},"formId":{"type":["string","null"]},"requestedByRecipient":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","leadId","legalBasis","source","channel","consentTextVersion","scope","grantedAt","withdrawnAt","evidenceRef","externalRef","importedBy","sourceUrl","ipAddress","formId","requestedByRecipient","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/leads/{leadId}/consents":{"get":{"operationId":"listLeadConsents","summary":"List a lead's consent records","tags":["Consents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"consents:read","parameters":[{"schema":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"leadId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^cons_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"legalBasis":{"type":"string"},"source":{"type":"string"},"channel":{"type":"string"},"consentTextVersion":{"type":["string","null"]},"scope":{"type":"string"},"grantedAt":{"type":"string","format":"date-time"},"withdrawnAt":{"type":["string","null"],"format":"date-time"},"evidenceRef":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"importedBy":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"ipAddress":{"type":["string","null"]},"formId":{"type":["string","null"]},"requestedByRecipient":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","leadId","legalBasis","source","channel","consentTextVersion","scope","grantedAt","withdrawnAt","evidenceRef","externalRef","importedBy","sourceUrl","ipAddress","formId","requestedByRecipient","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/consents/{consentId}/withdraw":{"post":{"operationId":"withdrawConsent","summary":"Record consent withdrawal","tags":["Consents"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"consents:write","parameters":[{"schema":{"type":"string","pattern":"^cons_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"consentId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cons_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"legalBasis":{"type":"string"},"source":{"type":"string"},"channel":{"type":"string"},"consentTextVersion":{"type":["string","null"]},"scope":{"type":"string"},"grantedAt":{"type":"string","format":"date-time"},"withdrawnAt":{"type":["string","null"],"format":"date-time"},"evidenceRef":{"type":["string","null"]},"externalRef":{"type":["string","null"]},"importedBy":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"ipAddress":{"type":["string","null"]},"formId":{"type":["string","null"]},"requestedByRecipient":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","leadId","legalBasis","source","channel","consentTextVersion","scope","grantedAt","withdrawnAt","evidenceRef","externalRef","importedBy","sourceUrl","ipAddress","formId","requestedByRecipient","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/suppressions":{"post":{"operationId":"createSuppression","summary":"Add a phone number to the suppression list","tags":["Suppressions"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"suppressions:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"reason":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":120,"default":"api"}},"required":["phone","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^sup_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"reason":{"type":"string"},"source":{"type":"string"},"callId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","reason","source","callId","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listSuppressions","summary":"List suppression entries","tags":["Suppressions"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"suppressions:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^sup_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"},"reason":{"type":"string"},"source":{"type":"string"},"callId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phone","reason","source","callId","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns":{"post":{"operationId":"createCampaign","summary":"Create a campaign (draft)","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"leadIds":{"type":"array","items":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"maxItems":10000,"default":[]},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"default":null,"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"],"minimum":1,"maximum":10,"default":2},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"],"minimum":1,"maximum":50,"default":5},"minMinutesBetweenAttempts":{"type":["integer","null"],"minimum":1,"maximum":10080,"default":60},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"default":null,"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"],"default":null},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string","maxLength":300},"campaign_deadline":{"type":"string","maxLength":300},"campaign_market":{"type":"string","maxLength":300},"asset_url":{"type":"string","maxLength":600}},"default":{},"additionalProperties":false},"takenIndustries":{"type":"array","items":{"type":"string","maxLength":180},"maxItems":50}},"required":["name","agentVersionId","providerConnectionId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listCampaigns","summary":"List campaigns","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}":{"get":{"operationId":"getCampaign","summary":"Get a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:read","parameters":[{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/leads":{"post":{"operationId":"addCampaignLeads","summary":"Attach leads to a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadIds":{"type":"array","items":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"minItems":1,"maxItems":10000}},"required":["leadIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"}},"required":["added"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/variables":{"patch":{"operationId":"updateCampaignVariables","summary":"Replace the campaign variables the agent may speak on its calls (offer, deadline, area, web address)","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"object","properties":{"campaign_offer":{"type":"string","maxLength":300},"campaign_deadline":{"type":"string","maxLength":300},"campaign_market":{"type":"string","maxLength":300},"asset_url":{"type":"string","maxLength":600}},"additionalProperties":false},"takenIndustries":{"type":"array","items":{"type":"string","maxLength":180},"maxItems":50}},"required":["variables"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/launch":{"post":{"operationId":"launchCampaign","summary":"Launch a campaign (async expansion)","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:launch","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"responses":{"202":{"description":"Accepted for asynchronous processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]},"id":{"type":"string"},"kind":{"type":"string"}},"required":["accepted","id","kind"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/pause":{"post":{"operationId":"pauseCampaign","summary":"Pause a running campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:launch","parameters":[{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/resume":{"post":{"operationId":"resumeCampaign","summary":"Resume a paused campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:launch","parameters":[{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/cancel":{"post":{"operationId":"cancelCampaign","summary":"Cancel a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:launch","parameters":[{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"name":{"type":"string"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","COMPLETED","CANCELLED"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"dispatchPaused":{"type":"boolean"},"callingWindow":{"type":["object","null"],"properties":{"startMinute":{"type":"integer","minimum":0,"maximum":1439},"endMinute":{"type":"integer","minimum":0,"maximum":1440},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1}},"required":["startMinute","endMinute","daysOfWeek"],"description":"Allowed local calling window (lead timezone), ISO weekdays: Monday=1"},"maxAttemptsPerLeadPerDay":{"type":["integer","null"]},"maxAttemptsPerLeadPerWeek":{"type":["integer","null"]},"minMinutesBetweenAttempts":{"type":["integer","null"]},"budgetHardCap":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"budgetSpent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"disclosureTemplateId":{"type":["string","null"]},"variables":{"type":"object","properties":{"campaign_offer":{"type":"string"},"campaign_deadline":{"type":"string"},"campaign_market":{"type":"string"},"asset_url":{"type":"string"}}},"variablesSetBy":{"type":"string","enum":["person","credential"]},"takenIndustries":{"type":"array","items":{"type":"string"}},"leadCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","state","agentVersionId","providerConnectionId","dispatchPaused","callingWindow","maxAttemptsPerLeadPerDay","maxAttemptsPerLeadPerWeek","minMinutesBetweenAttempts","budgetHardCap","budgetSpent","disclosureTemplateId","variables","variablesSetBy","takenIndustries","leadCount","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{campaignId}/stats":{"get":{"operationId":"getCampaignStats","summary":"Campaign execution statistics","tags":["Campaigns"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"campaigns:read","parameters":[{"schema":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"totalJobs":{"type":"integer"},"byState":{"type":"object","additionalProperties":{"type":"integer"}},"callsByState":{"type":"object","additionalProperties":{"type":"integer"}},"spent":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["totalJobs","byState","callsByState","spent"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls":{"post":{"operationId":"createCall","summary":"Create an individual (ad-hoc) call","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:create","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"scheduledAt":{"type":"string","format":"date-time"}},"required":["leadId","agentVersionId","providerConnectionId"]}}}},"responses":{"202":{"description":"Accepted for asynchronous processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]},"id":{"type":"string"},"kind":{"type":"string"}},"required":["accepted","id","kind"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listCalls","summary":"List call sessions","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"callJobId":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"campaignId":{"type":["string","null"],"pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"leadName":{"type":["string","null"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","ELIGIBILITY_CHECK","POLICY_BLOCKED","QUEUED","DISPATCHING","DISPATCHED","RINGING","IN_PROGRESS","TRANSFER_REQUESTED","TRANSFERRED","COMPLETED","FAILED","CANCELLED","NO_ANSWER","BUSY","VOICEMAIL","PROVIDER_REJECTED","BUDGET_EXCEEDED"]},"phoneSuffix":{"type":"string"},"startedAt":{"type":["string","null"],"format":"date-time"},"answeredAt":{"type":["string","null"],"format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"durationSeconds":{"type":["integer","null"]},"estimatedCost":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"actualCost":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"policyReasons":{"type":["array","null"],"items":{"type":"object","properties":{"code":{"type":"string"},"policy":{"type":"string"},"detail":{"type":"string"}},"required":["code","policy","detail"]}},"failureReason":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["KNOWLEDGE_UNAVAILABLE","IDENTITY_UNAVAILABLE","TEMPLATE_NOT_SUPPORTED","PROVIDER_REJECTED_MODEL","PROVIDER_REJECTED","PROVIDER_AUTH","PROVIDER_RATE_LIMITED","PROVIDER_UNAVAILABLE","PROVIDER_ERROR","OUTCOME_UNKNOWN","DISPATCH_UNCONFIRMED","DISPATCH_ERROR"]},"message":{"type":"string"}},"required":["code","message"]},"callerId":{"type":["string","null"]},"sellerName":{"type":["string","null"]},"eligibilityEvidence":{"type":["object","null"],"additionalProperties":{}},"followup":{"type":"object","properties":{"channel":{"type":"string","enum":["email"]},"status":{"type":"string","enum":["queued","sent","failed","suppressed"]},"toMasked":{"type":"string"},"purpose":{"type":"string","enum":["info","link"]},"requestedAt":{"type":"string","format":"date-time"},"sentAt":{"type":["string","null"],"format":"date-time"},"failureCode":{"type":["string","null"],"enum":["expired","not_ready","no_profile","send_failed",null]}},"required":["channel","status","toMasked","purpose","requestedAt","sentAt","failureCode"]},"origin":{"type":"string","enum":["scheduled","callback"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","callJobId","campaignId","leadId","leadName","agentVersionId","providerConnectionId","state","phoneSuffix","startedAt","answeredAt","endedAt","durationSeconds","estimatedCost","actualCost","policyReasons","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/test-calls":{"post":{"operationId":"createTestCall","summary":"Create a test call to one of the acting member's verified numbers","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:create","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}},"required":["agentVersionId","providerConnectionId","phone"]}}}},"responses":{"202":{"description":"Accepted for asynchronous processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]},"id":{"type":"string"},"kind":{"type":"string"}},"required":["accepted","id","kind"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/export":{"get":{"operationId":"exportCalls","summary":"Every call matching the list's filters as a CSV, newest first, at most 50,000 rows (streamed)","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:read","parameters":[{"schema":{"anyOf":[{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},{"type":"string","enum":["none"]}]},"required":false,"name":"campaign","in":"query"},{"schema":{"type":"string","enum":["DRAFT","SCHEDULED","ELIGIBILITY_CHECK","POLICY_BLOCKED","QUEUED","DISPATCHING","DISPATCHED","RINGING","IN_PROGRESS","TRANSFER_REQUESTED","TRANSFERRED","COMPLETED","FAILED","CANCELLED","NO_ANSWER","BUSY","VOICEMAIL","PROVIDER_REJECTED","BUDGET_EXCEEDED"]},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","pattern":"^agt_[0-9A-HJKMNP-TV-Z]{26}$"},"required":false,"name":"agent","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["tr","en"],"default":"en"},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"Success","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/redial":{"post":{"operationId":"redialCall","summary":"Call the same lead again with the same agent version; refused with the gate's reasons (422 CALL_REFUSED)","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:create","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."},{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"202":{"description":"Accepted for asynchronous processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]},"id":{"type":"string"},"kind":{"type":"string"}},"required":["accepted","id","kind"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}":{"get":{"operationId":"getCall","summary":"Get a call session","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:read","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"callJobId":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"campaignId":{"type":["string","null"],"pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"leadName":{"type":["string","null"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","ELIGIBILITY_CHECK","POLICY_BLOCKED","QUEUED","DISPATCHING","DISPATCHED","RINGING","IN_PROGRESS","TRANSFER_REQUESTED","TRANSFERRED","COMPLETED","FAILED","CANCELLED","NO_ANSWER","BUSY","VOICEMAIL","PROVIDER_REJECTED","BUDGET_EXCEEDED"]},"phoneSuffix":{"type":"string"},"startedAt":{"type":["string","null"],"format":"date-time"},"answeredAt":{"type":["string","null"],"format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"durationSeconds":{"type":["integer","null"]},"estimatedCost":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"actualCost":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"policyReasons":{"type":["array","null"],"items":{"type":"object","properties":{"code":{"type":"string"},"policy":{"type":"string"},"detail":{"type":"string"}},"required":["code","policy","detail"]}},"failureReason":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["KNOWLEDGE_UNAVAILABLE","IDENTITY_UNAVAILABLE","TEMPLATE_NOT_SUPPORTED","PROVIDER_REJECTED_MODEL","PROVIDER_REJECTED","PROVIDER_AUTH","PROVIDER_RATE_LIMITED","PROVIDER_UNAVAILABLE","PROVIDER_ERROR","OUTCOME_UNKNOWN","DISPATCH_UNCONFIRMED","DISPATCH_ERROR"]},"message":{"type":"string"}},"required":["code","message"]},"callerId":{"type":["string","null"]},"sellerName":{"type":["string","null"]},"eligibilityEvidence":{"type":["object","null"],"additionalProperties":{}},"followup":{"type":"object","properties":{"channel":{"type":"string","enum":["email"]},"status":{"type":"string","enum":["queued","sent","failed","suppressed"]},"toMasked":{"type":"string"},"purpose":{"type":"string","enum":["info","link"]},"requestedAt":{"type":"string","format":"date-time"},"sentAt":{"type":["string","null"],"format":"date-time"},"failureCode":{"type":["string","null"],"enum":["expired","not_ready","no_profile","send_failed",null]}},"required":["channel","status","toMasked","purpose","requestedAt","sentAt","failureCode"]},"origin":{"type":"string","enum":["scheduled","callback"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","callJobId","campaignId","leadId","leadName","agentVersionId","providerConnectionId","state","phoneSuffix","startedAt","answeredAt","endedAt","durationSeconds","estimatedCost","actualCost","policyReasons","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/cancel":{"post":{"operationId":"cancelCall","summary":"Cancel a not-yet-terminal call","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:cancel","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"callJobId":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"campaignId":{"type":["string","null"],"pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"leadName":{"type":["string","null"]},"agentVersionId":{"type":"string","pattern":"^agv_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"state":{"type":"string","enum":["DRAFT","SCHEDULED","ELIGIBILITY_CHECK","POLICY_BLOCKED","QUEUED","DISPATCHING","DISPATCHED","RINGING","IN_PROGRESS","TRANSFER_REQUESTED","TRANSFERRED","COMPLETED","FAILED","CANCELLED","NO_ANSWER","BUSY","VOICEMAIL","PROVIDER_REJECTED","BUDGET_EXCEEDED"]},"phoneSuffix":{"type":"string"},"startedAt":{"type":["string","null"],"format":"date-time"},"answeredAt":{"type":["string","null"],"format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"durationSeconds":{"type":["integer","null"]},"estimatedCost":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"actualCost":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"policyReasons":{"type":["array","null"],"items":{"type":"object","properties":{"code":{"type":"string"},"policy":{"type":"string"},"detail":{"type":"string"}},"required":["code","policy","detail"]}},"failureReason":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["KNOWLEDGE_UNAVAILABLE","IDENTITY_UNAVAILABLE","TEMPLATE_NOT_SUPPORTED","PROVIDER_REJECTED_MODEL","PROVIDER_REJECTED","PROVIDER_AUTH","PROVIDER_RATE_LIMITED","PROVIDER_UNAVAILABLE","PROVIDER_ERROR","OUTCOME_UNKNOWN","DISPATCH_UNCONFIRMED","DISPATCH_ERROR"]},"message":{"type":"string"}},"required":["code","message"]},"callerId":{"type":["string","null"]},"sellerName":{"type":["string","null"]},"eligibilityEvidence":{"type":["object","null"],"additionalProperties":{}},"followup":{"type":"object","properties":{"channel":{"type":"string","enum":["email"]},"status":{"type":"string","enum":["queued","sent","failed","suppressed"]},"toMasked":{"type":"string"},"purpose":{"type":"string","enum":["info","link"]},"requestedAt":{"type":"string","format":"date-time"},"sentAt":{"type":["string","null"],"format":"date-time"},"failureCode":{"type":["string","null"],"enum":["expired","not_ready","no_profile","send_failed",null]}},"required":["channel","status","toMasked","purpose","requestedAt","sentAt","failureCode"]},"origin":{"type":"string","enum":["scheduled","callback"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","callJobId","campaignId","leadId","leadName","agentVersionId","providerConnectionId","state","phoneSuffix","startedAt","answeredAt","endedAt","durationSeconds","estimatedCost","actualCost","policyReasons","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/call-jobs/{callJobId}/cancel":{"post":{"operationId":"cancelCallJob","summary":"Cancel a call job that has not started","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:create","parameters":[{"schema":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callJobId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"campaignId":{"type":["string","null"],"pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"state":{"type":"string","enum":["PENDING","IN_PROGRESS","WAITING_RETRY","COMPLETED","FAILED","CANCELLED"]},"attempt":{"type":"integer"},"maxAttempts":{"type":"integer"},"scheduledAt":{"type":"string","format":"date-time"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"lastError":{"type":["string","null"]},"origin":{"type":"string","enum":["scheduled","callback"]},"originCallSessionId":{"type":["string","null"],"pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","campaignId","leadId","state","attempt","maxAttempts","scheduledAt","nextAttemptAt","lastError","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/call-jobs/{callJobId}":{"get":{"operationId":"getCallJob","summary":"Get a call job (dispatch unit)","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:read","parameters":[{"schema":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callJobId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cjob_[0-9A-HJKMNP-TV-Z]{26}$"},"campaignId":{"type":["string","null"],"pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"leadId":{"type":"string","pattern":"^lead_[0-9A-HJKMNP-TV-Z]{26}$"},"state":{"type":"string","enum":["PENDING","IN_PROGRESS","WAITING_RETRY","COMPLETED","FAILED","CANCELLED"]},"attempt":{"type":"integer"},"maxAttempts":{"type":"integer"},"scheduledAt":{"type":"string","format":"date-time"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"lastError":{"type":["string","null"]},"origin":{"type":"string","enum":["scheduled","callback"]},"originCallSessionId":{"type":["string","null"],"pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","campaignId","leadId","state","attempt","maxAttempts","scheduledAt","nextAttemptAt","lastError","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/events":{"get":{"operationId":"listCallEvents","summary":"Immutable call event ledger","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"calls:read","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^cev_[0-9A-HJKMNP-TV-Z]{26}$"},"callSessionId":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"type":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"receivedAt":{"type":"string","format":"date-time"},"applied":{"type":"string","enum":["applied","superseded","rejected"]},"payload":{"type":"object","additionalProperties":{}}},"required":["id","callSessionId","type","occurredAt","receivedAt","applied","payload"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/transcript":{"get":{"operationId":"getCallTranscript","summary":"Call transcript (policy-gated)","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"transcripts:read","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"callSessionId":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"policy":{"type":"string","enum":["disabled","enabled","enabled_with_disclosure"]},"segments":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer"},"speaker":{"type":"string","enum":["agent","lead","system"]},"offsetMs":{"type":"integer"},"text":{"type":"string"},"language":{"type":["string","null"]}},"required":["sequence","speaker","offsetMs","text","language"]}}},"required":["callSessionId","policy","segments"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/outcome":{"get":{"operationId":"getCallOutcome","summary":"Structured call outcome","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"outcomes:read","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^out_[0-9A-HJKMNP-TV-Z]{26}$"},"callSessionId":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"disposition":{"type":"string"},"dispositionSource":{"type":["string","null"],"enum":["provider","tool","analysis",null]},"qualified":{"type":"boolean"},"appointmentAt":{"type":["string","null"],"format":"date-time"},"answers":{"type":"object","additionalProperties":{}},"summary":{"type":["string","null"]},"quality":{"type":"object","properties":{"productUnderstood":{"type":["boolean","null"]},"statedUnsupportedClaim":{"type":["boolean","null"]},"unansweredQuestion":{"type":["string","null"],"maxLength":300}},"required":["productUnderstood","statedUnsupportedClaim","unansweredQuestion"]},"analysis":{"type":"object","properties":{"disposition":{"type":["string","null"]},"followUpRequest":{"type":["string","null"],"maxLength":300},"callReason":{"type":["string","null"],"maxLength":80},"resolution":{"type":["string","null"],"enum":["resolved","not_resolved","transferred","no_request",null]}},"required":["disposition","followUpRequest","callReason","resolution"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","callSessionId","disposition","dispositionSource","qualified","appointmentAt","answers","summary","quality","analysis","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/recording":{"get":{"operationId":"getCallRecording","summary":"Whether the call has a playable recording (policy-gated)","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"recordings:read","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"callSessionId":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"policy":{"type":"string","enum":["disabled","enabled","enabled_with_disclosure"]},"recording":{"type":["object","null"],"properties":{"contentType":{"type":"string"},"durationSeconds":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["contentType","durationSeconds","createdAt"]}},"required":["callSessionId","policy","recording"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{callId}/recording/audio":{"get":{"operationId":"getCallRecordingAudio","summary":"The recording's audio, fetched from the provider on request (policy-gated, Range supported)","tags":["Calls"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"recordings:read","parameters":[{"schema":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Success","content":{"audio/*":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/usage/events":{"get":{"operationId":"listUsageEvents","summary":"Immutable usage ledger","tags":["Usage"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"usage:read","parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^usg_[0-9A-HJKMNP-TV-Z]{26}$"},"providerConnectionId":{"type":["string","null"],"pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"providerKind":{"type":["string","null"]},"callSessionId":{"type":["string","null"],"pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"dimension":{"type":"string","enum":["voice_seconds","transfer_seconds","outbound_attempt","sms_message","recording_storage","transcript_processing","premium_evaluation","tool_invocation"]},"quantity":{"type":"number"},"unit":{"type":"string"},"providerCostEstimate":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"customerPrice":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"priceVersionId":{"type":"string","pattern":"^prv_[0-9A-HJKMNP-TV-Z]{26}$"},"occurredAt":{"type":"string","format":"date-time"},"market":{"type":["string","null"],"enum":["US","OTHER",null]}},"required":["id","providerConnectionId","providerKind","callSessionId","dimension","quantity","unit","providerCostEstimate","customerPrice","priceVersionId","occurredAt","market"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/usage/summary":{"get":{"operationId":"getUsageSummary","summary":"Usage totals by dimension","tags":["Usage"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"usage:read","parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":["string","null"],"format":"date-time"},"to":{"type":["string","null"],"format":"date-time"},"totals":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["voice_seconds","transfer_seconds","outbound_attempt","sms_message","recording_storage","transcript_processing","premium_evaluation","tool_invocation"]},"quantity":{"type":"number"},"unit":{"type":"string"},"customerPrice":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["dimension","quantity","unit","customerPrice"]}},"totalCustomerPrice":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["from","to","totals","totalCustomerPrice"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/usage/display":{"get":{"operationId":"getUsageDisplay","summary":"Usage shown in USD, EUR or GBP, for display only; billing stays in your currency","tags":["Usage"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"usage:read","parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{3}$"},"required":false,"name":"currency","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":["string","null"],"format":"date-time"},"to":{"type":["string","null"],"format":"date-time"},"storedCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"requestedCurrency":{"type":["string","null"],"pattern":"^[A-Z]{3}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"defaultCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"options":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"available":{"type":"boolean"},"stored":{"type":"boolean"},"rate":{"type":["object","null"],"properties":{"from":{"type":"string","pattern":"^[A-Z]{3}$"},"to":{"type":"string","pattern":"^[A-Z]{3}$"},"rate":{"type":"string","pattern":"^d+.d+$"},"asOf":{"type":"string","pattern":"^d{4}-d{2}-d{2}$"},"source":{"type":"string"},"method":{"type":"string","enum":["direct","inverse","cross"]}},"required":["from","to","rate","asOf","source","method"]}},"required":["currency","available","stored","rate"]}},"rates":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^[A-Z]{3}$"},"to":{"type":"string","pattern":"^[A-Z]{3}$"},"rate":{"type":"string","pattern":"^d+.d+$"},"asOf":{"type":"string","pattern":"^d{4}-d{2}-d{2}$"},"source":{"type":"string"},"method":{"type":"string","enum":["direct","inverse","cross"]}},"required":["from","to","rate","asOf","source","method"]}},"totals":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["voice_seconds","transfer_seconds","outbound_attempt","sms_message","recording_storage","transcript_processing","premium_evaluation","tool_invocation"]},"unit":{"type":"string"},"quantity":{"type":"number"},"us":{"type":["object","null"],"properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]},"other":{"type":["object","null"],"properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]}},"required":["dimension","unit","quantity","us","other"]}},"usTotal":{"type":["object","null"],"properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]},"otherTotal":{"type":["object","null"],"properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]},"combinedTotal":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^usg_[0-9A-HJKMNP-TV-Z]{26}$"},"market":{"type":["string","null"],"enum":["US","OTHER",null]},"price":{"type":"object","properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]}},"required":["id","market","price"]}},"priceBook":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["voice_seconds","transfer_seconds","outbound_attempt","sms_message","recording_storage","transcript_processing","premium_evaluation","tool_invocation"]},"unit":{"type":"string"},"unitPrice":{"type":"object","properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]},"unitPriceExact":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["value","currency"]},"overridden":{"type":"boolean"}},"required":["dimension","unit","unitPrice","unitPriceExact","overridden"]}},"byProvider":{"type":"array","items":{"type":"object","properties":{"providerKind":{"type":["string","null"]},"calls":{"type":"number"},"revenue":{"type":"object","properties":{"money":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"status":{"type":"string","enum":["stored","converted","no_rate"]},"stored":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"partial":{"type":"boolean"},"unconverted":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["money","status","stored"]},"providerCostUsd":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["providerKind","calls","revenue","providerCostUsd"]}},"nextCursor":{"type":["string","null"]}},"required":["from","to","storedCurrency","requestedCurrency","currency","defaultCurrency","options","rates","totals","usTotal","otherTotal","combinedTotal","events","priceBook","byProvider","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/analytics/overview":{"get":{"operationId":"getAnalyticsOverview","summary":"Call funnel and cost KPIs","tags":["Analytics"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"analytics:read","parameters":[{"schema":{"type":"string","enum":["today","7d","30d","90d"]},"required":false,"name":"period","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timeZone","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"totalCalls":{"type":"integer"},"completedCalls":{"type":"integer"},"answeredCalls":{"type":"integer"},"failedCalls":{"type":"integer"},"qualifiedLeads":{"type":"integer"},"transfers":{"type":"integer"},"answerRate":{"type":"number"},"successRate":{"type":"number"},"totalSpend":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"costPerConnectedMinute":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"costPerQualifiedLead":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"connectedSeconds":{"type":"integer"},"productUnderstoodAnalysedCalls":{"type":"integer"},"productUnderstoodCalls":{"type":"integer"},"productUnderstoodRate":{"type":["number","null"]},"unsupportedClaimAnalysedCalls":{"type":"integer"},"unsupportedClaimCalls":{"type":"integer"},"resolution":{"type":"object","properties":{"analysedCalls":{"type":"integer"},"resolvedCalls":{"type":"integer"},"notResolvedCalls":{"type":"integer"},"transferredCalls":{"type":"integer"},"noRequestCalls":{"type":"integer"},"resolvedRate":{"type":["number","null"]}},"required":["analysedCalls","resolvedCalls","notResolvedCalls","transferredCalls","noRequestCalls","resolvedRate"]},"period":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["today","7d","30d","90d"]},"timeZone":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"previousFrom":{"type":"string","format":"date-time"},"previousTo":{"type":"string","format":"date-time"}},"required":["key","timeZone","from","to","previousFrom","previousTo"]},"previous":{"type":["object","null"],"properties":{"totalCalls":{"type":"integer"},"completedCalls":{"type":"integer"},"answeredCalls":{"type":"integer"},"failedCalls":{"type":"integer"},"qualifiedLeads":{"type":"integer"},"transfers":{"type":"integer"},"answerRate":{"type":"number"},"successRate":{"type":"number"},"totalSpend":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"costPerConnectedMinute":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"costPerQualifiedLead":{"type":["object","null"],"properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"connectedSeconds":{"type":"integer"},"productUnderstoodAnalysedCalls":{"type":"integer"},"productUnderstoodCalls":{"type":"integer"},"productUnderstoodRate":{"type":["number","null"]},"unsupportedClaimAnalysedCalls":{"type":"integer"},"unsupportedClaimCalls":{"type":"integer"},"resolution":{"type":"object","properties":{"analysedCalls":{"type":"integer"},"resolvedCalls":{"type":"integer"},"notResolvedCalls":{"type":"integer"},"transferredCalls":{"type":"integer"},"noRequestCalls":{"type":"integer"},"resolvedRate":{"type":["number","null"]}},"required":["analysedCalls","resolvedCalls","notResolvedCalls","transferredCalls","noRequestCalls","resolvedRate"]}},"required":["totalCalls","completedCalls","answeredCalls","failedCalls","qualifiedLeads","transfers","answerRate","successRate","totalSpend","costPerConnectedMinute","costPerQualifiedLead","connectedSeconds","productUnderstoodAnalysedCalls","productUnderstoodCalls","productUnderstoodRate","unsupportedClaimAnalysedCalls","unsupportedClaimCalls","resolution"]}},"required":["totalCalls","completedCalls","answeredCalls","failedCalls","qualifiedLeads","transfers","answerRate","successRate","totalSpend","costPerConnectedMinute","costPerQualifiedLead","connectedSeconds","productUnderstoodAnalysedCalls","productUnderstoodCalls","productUnderstoodRate","unsupportedClaimAnalysedCalls","unsupportedClaimCalls","resolution","period","previous"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/analytics/calls":{"get":{"operationId":"getCallRollup","summary":"Calls and answered calls per local day and hour","tags":["Analytics"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"analytics:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":90,"default":14},"required":false,"name":"days","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":500},"required":false,"name":"recent","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"timeZone","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"timeZone":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"calls":{"type":"integer","minimum":0},"answered":{"type":"integer","minimum":0}},"required":["date","calls","answered"]}},"recent":{"type":"object","properties":{"calls":{"type":"integer","minimum":0},"hours":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":1,"maximum":7},"hour":{"type":"integer","minimum":0,"maximum":23},"calls":{"type":"integer","minimum":0},"answered":{"type":"integer","minimum":0}},"required":["weekday","hour","calls","answered"]}},"campaigns":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"calls":{"type":"integer","minimum":0},"answered":{"type":"integer","minimum":0}},"required":["campaignId","calls","answered"]}},"states":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"calls":{"type":"integer","minimum":0}},"required":["state","calls"]}}},"required":["calls","hours","campaigns","states"]}},"required":["timeZone","days","recent"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/analytics/unanswered-questions":{"get":{"operationId":"getUnansweredQuestions","summary":"Questions the agents could not answer on calls in the last days, grouped, from the call quality analysis","tags":["Analytics"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"outcomes:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":30,"default":7},"required":false,"name":"days","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":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":30},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"totalCalls":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":300},"count":{"type":"integer","minimum":1},"lastSeenAt":{"type":"string","format":"date-time"},"latestCallId":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"},"sources":{"type":"array","items":{"type":"string","enum":["call_analysis","knowledge_search"]},"minItems":1,"maxItems":2}},"required":["text","count","lastSeenAt","latestCallId"]},"maxItems":20}},"required":["days","from","to","totalCalls","items"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/analytics/call-reasons":{"get":{"operationId":"getCallReasons","summary":"Why people called the support agents in the last days, grouped, with how each group's calls ended, from the call quality analysis","tags":["Analytics"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"outcomes:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":30,"default":7},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":30},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"totalCalls":{"type":"integer","minimum":0},"items":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"count":{"type":"integer","minimum":1},"resolvedCalls":{"type":"integer","minimum":0},"notResolvedCalls":{"type":"integer","minimum":0},"transferredCalls":{"type":"integer","minimum":0},"noRequestCalls":{"type":"integer","minimum":0},"lastSeenAt":{"type":"string","format":"date-time"},"latestCallId":{"type":"string","pattern":"^call_[0-9A-HJKMNP-TV-Z]{26}$"}},"required":["text","count","resolvedCalls","notResolvedCalls","transferredCalls","noRequestCalls","lastSeenAt","latestCallId"]},"maxItems":20}},"required":["days","from","to","totalCalls","items"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/pricing":{"get":{"operationId":"getPricing","summary":"Effective price book this tenant is billed at","tags":["Usage"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"billing:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["voice_seconds","transfer_seconds","outbound_attempt","sms_message","recording_storage","transcript_processing","premium_evaluation","tool_invocation"]},"unit":{"type":"string"},"unitPrice":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"overridden":{"type":"boolean"}},"required":["dimension","unit","unitPrice","overridden"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/usage/by-provider":{"get":{"operationId":"getUsageByProvider","summary":"Revenue and provider cost grouped by provider","tags":["Usage"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"usage:read","parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"providerKind":{"type":["string","null"]},"calls":{"type":"integer"},"revenue":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]},"providerCostUsd":{"type":"object","properties":{"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"]}},"required":["providerKind","calls","revenue","providerCostUsd"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/usage/carrier":{"get":{"operationId":"getCarrierCosts","summary":"Carrier balance and carrier cost of the period (cost side only)","tags":["Usage"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"usage:read","parameters":[{"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":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"balances":{"type":"array","items":{"type":"object","properties":{"connectionId":{"type":"string","pattern":"^pcon_[0-9A-HJKMNP-TV-Z]{26}$"},"connectionName":{"type":"string"},"carrier":{"type":"string","enum":["telnyx"]},"balance":{"type":["object","null"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"balance":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"availableCredit":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"creditLimit":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"pending":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"}},"required":["currency","balance","availableCredit","creditLimit","pending"]},"error":{"type":["string","null"],"enum":["auth","unavailable",null]}},"required":["connectionId","connectionName","carrier","balance","error"]}},"totals":{"type":"array","items":{"type":"object","properties":{"carrier":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"calls":{"type":"integer"},"billedSeconds":{"type":"integer"}},"required":["carrier","currency","amount","calls","billedSeconds"]}}},"required":["from","to","balances","totals"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints":{"post":{"operationId":"createWebhookEndpoint","summary":"Register a webhook endpoint (secret returned once)","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"webhooks:manage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Unique key making this mutation safely retryable."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.queued","call.started","call.ringing","call.answered","call.transferred","call.completed","call.failed","lead.qualified","lead.opted_out","appointment.created","campaign.completed","budget.threshold_reached"]},"minItems":1}},"required":["url","eventTypes"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.queued","call.started","call.ringing","call.answered","call.transferred","call.completed","call.failed","lead.qualified","lead.opted_out","appointment.created","campaign.completed","budget.threshold_reached"]}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","description","eventTypes","active","createdAt"]},"secret":{"type":"string"}},"required":["endpoint","secret"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"webhooks:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.queued","call.started","call.ringing","call.answered","call.transferred","call.completed","call.failed","lead.qualified","lead.opted_out","appointment.created","campaign.completed","budget.threshold_reached"]}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","description","eventTypes","active","createdAt"]}}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints/{endpointId}":{"delete":{"operationId":"deactivateWebhookEndpoint","summary":"Deactivate a webhook endpoint","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"webhooks:manage","parameters":[{"schema":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"endpointId","in":"path"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.queued","call.started","call.ringing","call.answered","call.transferred","call.completed","call.failed","lead.qualified","lead.opted_out","appointment.created","campaign.completed","budget.threshold_reached"]}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","description","eventTypes","active","createdAt"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints/{endpointId}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"Delivery history","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"webhooks:read","parameters":[{"schema":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"endpointId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[0-9A-HJKMNP-TV-Z]{26}$"},"endpointId":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"eventId":{"type":"string","pattern":"^evt_[0-9A-HJKMNP-TV-Z]{26}$"},"eventType":{"type":"string","enum":["call.queued","call.started","call.ringing","call.answered","call.transferred","call.completed","call.failed","lead.qualified","lead.opted_out","appointment.created","campaign.completed","budget.threshold_reached"]},"status":{"type":"string","enum":["pending","delivering","delivered","failed","dead"]},"attempts":{"type":"integer"},"lastResponseStatus":{"type":["integer","null"]},"lastError":{"type":["string","null"]},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"deliveredAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","endpointId","eventId","eventType","status","attempts","lastResponseStatus","lastError","nextAttemptAt","deliveredAt","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints/{endpointId}/deliveries/{deliveryId}/replay":{"post":{"operationId":"replayWebhookDelivery","summary":"Manually replay a delivery","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"webhooks:manage","parameters":[{"schema":{"type":"string","pattern":"^whep_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"endpointId","in":"path"},{"schema":{"type":"string","pattern":"^whd_[0-9A-HJKMNP-TV-Z]{26}$"},"required":true,"name":"deliveryId","in":"path"}],"responses":{"202":{"description":"Accepted for asynchronous processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]},"id":{"type":"string"},"kind":{"type":"string"}},"required":["accepted","id","kind"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/audit-logs":{"get":{"operationId":"listAuditLogs","summary":"Tenant audit log","tags":["Audit"],"security":[{"bearerAuth":[]}],"x-callboi-permission":"audit:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^aud_[0-9A-HJKMNP-TV-Z]{26}$"},"actorType":{"type":"string","enum":["user","api_client","oauth_grant","operator","system"]},"actorId":{"type":["string","null"]},"action":{"type":"string"},"entityType":{"type":["string","null"]},"entityId":{"type":["string","null"]},"detail":{"type":"object","additionalProperties":{}},"correlationId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","actorType","actorId","action","entityType","entityId","detail","correlationId","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"4XX":{"description":"Request error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}}},"webhooks":{}}