{"openapi":"3.0.1","info":{"title":"HexaVox API","description":"HexaVox public integration APIs for merchant provisioning, consent, messaging, billing, reporting, and voice provisioning.","version":"0.1.0"},"servers":[{"url":"https://api.gohexavox.com","description":"Production API"},{"url":"https://app.gohexavox.com","description":"Dashboard proxy API"}],"tags":[{"name":"Billing","description":"Request merchant channel upgrades and read merchant alert state."},{"name":"Billing","description":"Request merchant upgrades and read merchant alert state."},{"name":"Messages","description":"Dispatch merchant SMS, voice, and email messages."},{"name":"Consents","description":"Manage opt-in and opt-out status for merchant recipients by channel."},{"name":"Merchants","description":"Manage merchant SMS compliance, 10DLC registration state, and assigned messaging numbers."},{"name":"Merchants","description":"Create, update, and inspect merchant accounts, limits, credits, and usage."}],"paths":{"/api/v1/voice/tts-calls":{"get":{"tags":["Messages"],"summary":"List outbound AI TTS calls","description":"Lists recent AI voice notify requests for the authenticated tenant, optionally filtered by merchant, sub-tenant, source system, or use case.","operationId":"list","parameters":[{"name":"merchantId","in":"query","required":false,"schema":{"type":"string"}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}},{"name":"sourceSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"useCase","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoiceTtsCallView"}}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]},"post":{"tags":["Messages"],"summary":"Queue outbound AI TTS call","description":"Generates speech from merchant-provided text, places one or more outbound calls, and tracks separate TTS and call usage with merchant and sub-tenant attribution.","operationId":"create","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1VoiceTtsCallRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoiceTtsSubmissionView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/voice/provisioning/sip-presence":{"post":{"tags":["v-1-voice-provisioning-controller"],"operationId":"sipPresence","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1VoiceSipPresenceRequest"}}},"required":true},"responses":{"204":{"description":"No Content"}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/sms/send":{"post":{"tags":["v-1-sms-controller"],"operationId":"send","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SmsSendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/V1MessageResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/simulator/reply":{"post":{"tags":["v-1-simulator-controller"],"operationId":"reply","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SimulatorReplyRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/V1SimulatorReplyResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/messages/voice":{"post":{"tags":["Messages"],"summary":"Send voice message","description":"Starts an outbound merchant voice call with text-to-speech after consent and quota checks.","operationId":"voice","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OmniVoiceSendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DispatchResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/messages/sms":{"post":{"tags":["Messages"],"summary":"Send SMS","description":"Queues and dispatches an outbound merchant SMS after consent and quota checks.","operationId":"sms","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OmniSmsSendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DispatchResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/messages/email":{"post":{"tags":["Messages"],"summary":"Send email","description":"Dispatches an outbound merchant email after consent and quota checks.","operationId":"email","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OmniEmailSendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DispatchResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants":{"get":{"tags":["Merchants"],"summary":"List merchants","description":"Lists merchants for the authenticated tenant with their limits, credits, and current usage.","operationId":"list_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MerchantView"}}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]},"post":{"tags":["Merchants"],"summary":"Create or update merchant","description":"Creates a merchant or updates its active state, limits, and credit balances.","operationId":"upsert","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantUpsertRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MerchantView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants/{merchantId}/messaging/numbers":{"post":{"tags":["Merchants"],"summary":"Create or update a merchant SMS number","operationId":"upsertPhoneNumber","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantPhoneNumberRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PhoneNumberView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants/{merchantId}/messaging/numbers/{numberId}/assign":{"post":{"tags":["Merchants"],"summary":"Assign a merchant SMS number to the merchant campaign","operationId":"assignPhoneNumber","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"numberId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantPhoneNumberAssignRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PhoneNumberView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants/{merchantId}/messaging/campaign":{"post":{"tags":["Merchants"],"summary":"Create or update merchant messaging campaign","operationId":"upsertCampaign","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantMessagingCampaignRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CampaignView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants/{merchantId}/messaging/brand":{"post":{"tags":["Merchants"],"summary":"Create or update merchant messaging brand","operationId":"upsertBrand","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantMessagingBrandRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BrandView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/email/send":{"post":{"tags":["v-1-email-controller"],"operationId":"send_1","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1EmailSendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/V1MessageResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/consents":{"get":{"tags":["Consents"],"summary":"List consent records","description":"Lists consent records for the current tenant, optionally filtered to one merchant.","operationId":"list_2","parameters":[{"name":"merchantId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConsentView"}}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]},"post":{"tags":["Consents"],"summary":"Upsert recipient consent","description":"Creates or updates a merchant recipient consent record for SMS, voice, or email.","operationId":"upsert_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantConsentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConsentView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/billing/upgrade":{"post":{"tags":["Billing"],"summary":"Request merchant upgrade","description":"Starts a merchant channel upgrade and returns the initial HexaPay-backed payment state.","operationId":"upgrade","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MerchantUpgradeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MerchantUpgradeView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/voice/tts-calls/{requestId}":{"get":{"tags":["Messages"],"summary":"Get outbound AI TTS call","description":"Fetches one outbound AI voice notify request with TTS usage, call usage, and final delivery status.","operationId":"get","parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoiceTtsCallView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/voice/tts-calls/batches/{batchId}/summary":{"get":{"tags":["Messages"],"summary":"Get AI voice batch summary","description":"Returns delivery segmentation counts and aggregate cost for one AI voice batch.","operationId":"batchSummary","parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/VoiceTtsBatchSummaryView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/voice/tts-calls/batches/{batchId}/numbers":{"get":{"tags":["Messages"],"summary":"List AI voice batch numbers","description":"Returns number-level delivery breakdown for one AI voice batch, optionally filtered by final delivery status.","operationId":"batchNumbers","parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoiceTtsBatchNumberView"}}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/voice/provisioning":{"get":{"tags":["v-1-voice-provisioning-controller"],"operationId":"provisioning","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/V1VoiceProvisioningResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/voice/provisioning/freeswitch/directory/{identifier}":{"get":{"tags":["v-1-voice-provisioning-controller"],"operationId":"freeSwitchDirectory","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/reports/usage":{"get":{"tags":["v-1-reports-controller"],"operationId":"usage","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/V1UsageReportResponse"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants/{merchantId}":{"get":{"tags":["Merchants"],"summary":"Get merchant","description":"Fetches one merchant by merchantId for the authenticated tenant.","operationId":"get_1","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MerchantView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/merchants/{merchantId}/messaging/status":{"get":{"tags":["Merchants"],"summary":"Get merchant SMS compliance and 10DLC status","operationId":"status","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MerchantSmsRegistrationStatusView"}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}},"/api/v1/alerts":{"get":{"tags":["Billing"],"summary":"List merchant alerts","description":"Lists merchant usage threshold and provider failure alerts for the current tenant.","operationId":"alerts","parameters":[{"name":"merchantId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertView"}}}}}},"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}]}}},"components":{"schemas":{"V1VoiceTtsCallRequest":{"required":["merchantId","messageText","useCase"],"type":"object","properties":{"platformAccountId":{"type":"string"},"merchantId":{"type":"string"},"tenantId":{"type":"string"},"sourceSystem":{"type":"string"},"useCase":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string"},"toNumber":{"type":"string"},"toNumbers":{"type":"array","items":{"type":"string"}},"messageText":{"type":"string"},"language":{"type":"string"},"voiceProfile":{"type":"string"},"customerTimezone":{"type":"string"},"priority":{"type":"string"},"callbackUrl":{"type":"string"},"idempotencyKey":{"type":"string"}}},"VoiceTtsSubmissionView":{"type":"object","properties":{"batchId":{"type":"string"},"requestId":{"type":"string"},"status":{"type":"string"},"executionType":{"type":"string"},"scheduledAt":{"type":"string"},"policyReason":{"type":"string"},"merchantId":{"type":"string"},"platformAccountId":{"type":"string"},"tenantId":{"type":"string"},"sourceSystem":{"type":"string"},"useCase":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string"},"toNumber":{"type":"string"},"language":{"type":"string"},"voiceProfile":{"type":"string"},"totalCalls":{"type":"integer","format":"int32"},"successCount":{"type":"integer","format":"int32"},"failedCount":{"type":"integer","format":"int32"},"partialCount":{"type":"integer","format":"int32"},"pendingCount":{"type":"integer","format":"int32"},"scheduledCount":{"type":"integer","format":"int32"},"estimatedTtsCharacters":{"type":"integer","format":"int32"},"estimatedTtsCost":{"type":"number"},"estimatedCallCost":{"type":"number"},"totalEstimatedCost":{"type":"number"}}},"V1VoiceSipPresenceRequest":{"type":"object","properties":{"sipUsername":{"type":"string"},"registered":{"type":"boolean"}}},"V1SmsSendRequest":{"required":["message","to"],"type":"object","properties":{"to":{"type":"string"},"message":{"type":"string"}}},"V1MessageResponse":{"type":"object","properties":{"messageId":{"type":"string"},"status":{"type":"string"}}},"V1SimulatorReplyRequest":{"required":["messageId","replyBody","tenantId"],"type":"object","properties":{"tenantId":{"type":"string"},"messageId":{"type":"string"},"replyBody":{"type":"string"}}},"V1SimulatorReplyResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}},"V1OmniVoiceSendRequest":{"required":["merchantId","text","to","type"],"type":"object","properties":{"merchantId":{"type":"string","description":"Merchant identifier issued by HexaVox.","example":"gym-a"},"to":{"type":"string","description":"Recipient phone number in E.164 format.","example":"+18135551234"},"text":{"type":"string","description":"Text that HexaVox converts to speech.","example":"Your appointment is tomorrow at 10 AM"},"type":{"type":"string","description":"Message type: OTP, REMINDER, MARKETING, or TRANSACTIONAL.","example":"REMINDER"},"record":{"type":"boolean","description":"Whether the outbound call should be recorded.","example":false},"timeoutSeconds":{"type":"integer","description":"Optional outbound timeout in seconds.","format":"int32","example":30}},"description":"Merchant outbound voice request."},"DispatchResponse":{"type":"object","properties":{"merchantId":{"type":"string"},"channel":{"type":"string"},"messageId":{"type":"string"},"status":{"type":"string"}}},"V1OmniSmsSendRequest":{"required":["merchantId","message","to","type"],"type":"object","properties":{"merchantId":{"type":"string","description":"Merchant identifier issued by HexaVox.","example":"gym-a"},"to":{"type":"string","description":"Recipient phone number in E.164 format.","example":"+18135551234"},"message":{"type":"string","description":"SMS body text.","example":"Your OTP is 123456"},"type":{"type":"string","description":"Message type: OTP, REMINDER, MARKETING, or TRANSACTIONAL.","example":"OTP"}},"description":"Merchant outbound SMS request."},"V1OmniEmailSendRequest":{"required":["body","merchantId","subject","to","type"],"type":"object","properties":{"merchantId":{"type":"string","description":"Merchant identifier issued by HexaVox.","example":"gym-a"},"to":{"type":"string","description":"Recipient email address.","example":"member@example.com"},"subject":{"type":"string","description":"Email subject line.","example":"Payment reminder"},"body":{"type":"string","description":"Email body. HTML is supported.","example":"<p>Your membership renews tomorrow.</p>"},"type":{"type":"string","description":"Message type: OTP, REMINDER, MARKETING, or TRANSACTIONAL.","example":"TRANSACTIONAL"}},"description":"Merchant outbound email request."},"V1MerchantUpsertRequest":{"required":["displayName","merchantId"],"type":"object","properties":{"merchantId":{"type":"string","description":"Merchant identifier issued by HexaVox.","example":"gym-a"},"displayName":{"type":"string","description":"Merchant display name.","example":"Gym A"},"active":{"type":"boolean","description":"Whether the merchant is active.","example":true},"smsLimit":{"type":"integer","description":"Monthly SMS limit.","format":"int64","example":5000},"voiceMinutesLimit":{"type":"integer","description":"Monthly voice minute limit.","format":"int64","example":1000},"emailLimit":{"type":"integer","description":"Monthly email limit.","format":"int64","example":25000},"smsCredits":{"type":"integer","description":"Available SMS credits.","format":"int64","example":0},"voiceMinutesCredits":{"type":"integer","description":"Available voice minute credits.","format":"int64","example":0},"emailCredits":{"type":"integer","description":"Available email credits.","format":"int64","example":0}},"description":"Create or update a merchant under the authenticated tenant."},"MerchantCreditView":{"type":"object","properties":{"smsCredits":{"type":"integer","format":"int64"},"voiceMinutesCredits":{"type":"integer","format":"int64"},"emailCredits":{"type":"integer","format":"int64"}}},"MerchantLimitView":{"type":"object","properties":{"smsLimit":{"type":"integer","format":"int64"},"voiceMinutesLimit":{"type":"integer","format":"int64"},"emailLimit":{"type":"integer","format":"int64"}}},"MerchantUsageView":{"type":"object","properties":{"smsUsed":{"type":"integer","format":"int64"},"voiceUsed":{"type":"integer","format":"int64"},"emailUsed":{"type":"integer","format":"int64"},"periodStart":{"type":"string"}}},"MerchantView":{"type":"object","properties":{"merchantId":{"type":"string"},"displayName":{"type":"string"},"active":{"type":"boolean"},"limits":{"$ref":"#/components/schemas/MerchantLimitView"},"credits":{"$ref":"#/components/schemas/MerchantCreditView"},"usage":{"$ref":"#/components/schemas/MerchantUsageView"}}},"V1MerchantPhoneNumberRequest":{"required":["phoneNumber"],"type":"object","properties":{"provider":{"type":"string"},"providerNumberId":{"type":"string"},"phoneNumber":{"type":"string"},"numberType":{"type":"string"},"countryCode":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"campaignId":{"type":"integer","format":"int64"},"assignmentStatus":{"type":"string"},"status":{"type":"string"}}},"PhoneNumberView":{"type":"object","properties":{"merchantId":{"type":"string"},"id":{"type":"integer","format":"int64"},"provider":{"type":"string"},"providerNumberId":{"type":"string"},"phoneNumber":{"type":"string"},"numberType":{"type":"string"},"countryCode":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"campaignId":{"type":"integer","format":"int64"},"assignmentStatus":{"type":"string"},"status":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"V1MerchantPhoneNumberAssignRequest":{"required":["campaignId"],"type":"object","properties":{"campaignId":{"type":"integer","format":"int64"}}},"V1MerchantMessagingCampaignRequest":{"required":["description","helpKeywords","helpMessage","messageFlow","optInKeywords","optInMessage","optOutKeywords","optOutMessage","sampleMessages","useCase"],"type":"object","properties":{"provider":{"type":"string"},"providerCampaignId":{"type":"string"},"campaignReference":{"type":"string"},"useCase":{"type":"string"},"vertical":{"type":"string"},"description":{"type":"string"},"messageFlow":{"type":"string"},"sampleMessages":{"type":"array","items":{"type":"string"}},"optInKeywords":{"type":"array","items":{"type":"string"}},"optInMessage":{"type":"string"},"optOutKeywords":{"type":"array","items":{"type":"string"}},"optOutMessage":{"type":"string"},"helpKeywords":{"type":"array","items":{"type":"string"}},"helpMessage":{"type":"string"},"subUseCases":{"type":"array","items":{"type":"string"}},"privacyPolicyLink":{"type":"string"},"termsAndConditionsLink":{"type":"string"},"status":{"type":"string"},"reviewStatus":{"type":"string"},"reviewFailureCode":{"type":"string"},"reviewFailureReason":{"type":"string"},"rawProviderPayload":{"type":"string"}}},"CampaignView":{"type":"object","properties":{"merchantId":{"type":"string"},"id":{"type":"integer","format":"int64"},"brandId":{"type":"integer","format":"int64"},"provider":{"type":"string"},"providerCampaignId":{"type":"string"},"campaignReference":{"type":"string"},"useCase":{"type":"string"},"vertical":{"type":"string"},"description":{"type":"string"},"messageFlow":{"type":"string"},"sampleMessages":{"type":"array","items":{"type":"string"}},"optInKeywords":{"type":"array","items":{"type":"string"}},"optInMessage":{"type":"string"},"optOutKeywords":{"type":"array","items":{"type":"string"}},"optOutMessage":{"type":"string"},"helpKeywords":{"type":"array","items":{"type":"string"}},"helpMessage":{"type":"string"},"subUseCases":{"type":"array","items":{"type":"string"}},"privacyPolicyLink":{"type":"string"},"termsAndConditionsLink":{"type":"string"},"status":{"type":"string"},"reviewStatus":{"type":"string"},"reviewFailureCode":{"type":"string"},"reviewFailureReason":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"V1MerchantMessagingBrandRequest":{"required":["legalBusinessName"],"type":"object","properties":{"provider":{"type":"string"},"providerBrandId":{"type":"string"},"externalBrandRef":{"type":"string"},"legalBusinessName":{"type":"string"},"businessType":{"type":"string"},"websiteUrl":{"type":"string"},"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"contactFirstName":{"type":"string"},"contactLastName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":"string"},"status":{"type":"string"},"verificationStatus":{"type":"string"},"rawProviderPayload":{"type":"string"}}},"BrandView":{"type":"object","properties":{"merchantId":{"type":"string"},"id":{"type":"integer","format":"int64"},"provider":{"type":"string"},"providerBrandId":{"type":"string"},"externalBrandRef":{"type":"string"},"legalBusinessName":{"type":"string"},"businessType":{"type":"string"},"websiteUrl":{"type":"string"},"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"contactFirstName":{"type":"string"},"contactLastName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":"string"},"status":{"type":"string"},"verificationStatus":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"V1EmailSendRequest":{"required":["body","to"],"type":"object","properties":{"to":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"}}},"V1MerchantConsentRequest":{"required":["channel","contact","merchantId","status"],"type":"object","properties":{"merchantId":{"type":"string","description":"Merchant identifier issued by HexaVox.","example":"gym-a"},"channel":{"type":"string","description":"Channel: SMS, VOICE, or EMAIL.","example":"SMS"},"contact":{"type":"string","description":"Phone number or email address for the recipient.","example":"+18135551234"},"status":{"type":"string","description":"Consent status: OPT_IN or OPT_OUT.","example":"OPT_IN"},"source":{"type":"string","description":"Source system or workflow that captured consent.","example":"checkout-form"}},"description":"Merchant recipient consent update request."},"ConsentView":{"type":"object","properties":{"merchantId":{"type":"string"},"channel":{"type":"string"},"contact":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"updatedAt":{"type":"string"}}},"V1MerchantUpgradeRequest":{"required":["channel","merchantId"],"type":"object","properties":{"merchantId":{"type":"string","description":"Merchant identifier issued by HexaVox.","example":"gym-a"},"channel":{"type":"string","description":"Channel to upgrade: SMS, VOICE, or EMAIL.","example":"SMS"},"units":{"type":"integer","description":"Additional units or credits requested.","format":"int64","example":1000},"amountCents":{"type":"integer","description":"Charge amount in cents.","format":"int64","example":2000},"paymentMethodId":{"type":"integer","description":"Stored HexaPay payment method identifier.","format":"int64","example":42},"currency":{"type":"string","description":"Currency code. Defaults to USD when omitted.","example":"USD"},"note":{"type":"string","description":"Optional internal note for the upgrade.","example":"April SMS top-up"},"referenceId":{"type":"string","description":"Optional merchant-side reference identifier.","example":"merchant-upgrade-20260331-001"}},"description":"Merchant billing upgrade request."},"MerchantUpgradeView":{"type":"object","properties":{"merchantId":{"type":"string"},"channel":{"type":"string"},"unitsRequested":{"type":"integer","format":"int64"},"amountCents":{"type":"integer","format":"int64"},"currency":{"type":"string"},"paymentId":{"type":"string"},"paymentStatus":{"type":"string"},"fulfilled":{"type":"boolean"},"remainingCredits":{"type":"integer","format":"int64"}}},"VoiceTtsCallView":{"type":"object","properties":{"requestId":{"type":"string"},"batchId":{"type":"string"},"status":{"type":"string"},"callStatus":{"type":"string"},"playbackStatus":{"type":"string"},"finalStatus":{"type":"string"},"merchantId":{"type":"string"},"platformAccountId":{"type":"string"},"tenantId":{"type":"string"},"sourceSystem":{"type":"string"},"useCase":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string"},"toNumber":{"type":"string"},"language":{"type":"string"},"voiceProfile":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"ttsAssetId":{"type":"integer","format":"int64"},"ttsCacheStatus":{"type":"string"},"billingState":{"type":"string"},"callSessionId":{"type":"integer","format":"int64"},"providerCallId":{"type":"string"},"callDurationSeconds":{"type":"integer","format":"int32"},"attemptCount":{"type":"integer","format":"int32"},"executionType":{"type":"string"},"executionTimezone":{"type":"string"},"scheduledAt":{"type":"string"},"executedAt":{"type":"string"},"policyReason":{"type":"string"},"requestedPriority":{"type":"string"},"estimatedTtsCharacters":{"type":"integer","format":"int32"},"estimatedTtsCost":{"type":"number"},"estimatedCallCost":{"type":"number"},"actualTtsCharacters":{"type":"integer","format":"int32"},"actualTtsCost":{"type":"number"},"actualCallCost":{"type":"number"},"projectedTotalCost":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string"},"error":{"type":"string"},"deliveryReason":{"type":"string"},"usage":{"type":"array","items":{"$ref":"#/components/schemas/VoiceTtsUsageView"}}}},"VoiceTtsUsageView":{"type":"object","properties":{"usageType":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"provider":{"type":"string"},"providerModel":{"type":"string"},"baseCost":{"type":"number"},"markupCost":{"type":"number"},"finalCost":{"type":"number"},"eventTime":{"type":"string"}}},"VoiceTtsBatchSummaryView":{"type":"object","properties":{"batchId":{"type":"string"},"status":{"type":"string"},"merchantId":{"type":"string"},"platformAccountId":{"type":"string"},"tenantId":{"type":"string"},"sourceSystem":{"type":"string"},"useCase":{"type":"string"},"campaignId":{"type":"string"},"campaignName":{"type":"string"},"totalCalls":{"type":"integer","format":"int32"},"success":{"type":"integer","format":"int32"},"failed":{"type":"integer","format":"int32"},"partial":{"type":"integer","format":"int32"},"pending":{"type":"integer","format":"int32"},"scheduled":{"type":"integer","format":"int32"},"finalizedCount":{"type":"integer","format":"int32"},"provisionalCount":{"type":"integer","format":"int32"},"ttsCacheHits":{"type":"integer","format":"int32"},"ttsCacheMisses":{"type":"integer","format":"int32"},"ttsCacheHitRatio":{"type":"number"},"provisionalCost":{"type":"number"},"finalizedCost":{"type":"number"},"totalTtsCost":{"type":"number"},"totalCallCost":{"type":"number"},"totalCost":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string"}}},"VoiceTtsBatchNumberView":{"type":"object","properties":{"requestId":{"type":"string"},"toNumber":{"type":"string"},"callStatus":{"type":"string"},"playbackStatus":{"type":"string"},"finalStatus":{"type":"string"},"executionType":{"type":"string"},"executionTimezone":{"type":"string"},"scheduledAt":{"type":"string"},"executedAt":{"type":"string"},"durationSeconds":{"type":"integer","format":"int32"},"ttsAssetId":{"type":"integer","format":"int64"},"ttsCacheStatus":{"type":"string"},"billingState":{"type":"string"},"ttsCharacters":{"type":"integer","format":"int32"},"ttsCost":{"type":"number"},"callCost":{"type":"number"},"totalCost":{"type":"number"},"projectedTotalCost":{"type":"number"},"deliveryReason":{"type":"string"},"requestedPriority":{"type":"string"},"completedAt":{"type":"string"}}},"MemberPayload":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"email":{"type":"string"},"priority":{"type":"integer","format":"int32"},"enabled":{"type":"boolean"},"agentStatus":{"type":"string"},"forwardNumber":{"type":"string"},"browserEnabled":{"type":"boolean"},"browserClientIdentity":{"type":"string"},"browserActive":{"type":"boolean"}}},"OptionPayload":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"digit":{"type":"string"},"label":{"type":"string"},"actionType":{"type":"string"},"targetValue":{"type":"string"},"ringGroupId":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"sortOrder":{"type":"integer","format":"int32"}}},"V1VoiceProvisioningResponse":{"type":"object","properties":{"tenantId":{"type":"integer","format":"int64"},"sipHost":{"type":"string"},"sipDomain":{"type":"string"},"udpPort":{"type":"integer","format":"int32"},"tlsPort":{"type":"integer","format":"int32"},"wsPort":{"type":"integer","format":"int32"},"wssUrl":{"type":"string"},"sipUsers":{"type":"array","items":{"$ref":"#/components/schemas/V1VoiceSipUserPayload"}},"phoneNumbers":{"type":"array","items":{"$ref":"#/components/schemas/VoicePhoneNumberPayload"}},"ringGroups":{"type":"array","items":{"$ref":"#/components/schemas/VoiceRingGroupPayload"}},"menus":{"type":"array","items":{"$ref":"#/components/schemas/VoiceIvrMenuPayload"}}}},"V1VoiceSipUserPayload":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"email":{"type":"string"},"extension":{"type":"string"},"sipUsername":{"type":"string"},"password":{"type":"string"},"agentStatus":{"type":"string"},"voiceEnabled":{"type":"boolean"},"browserEnabled":{"type":"boolean"},"forwardNumber":{"type":"string"}}},"VoiceIvrMenuPayload":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"menuName":{"type":"string"},"greetingText":{"type":"string"},"greetingUrl":{"type":"string"},"ttsVoice":{"type":"string"},"ttsLanguage":{"type":"string"},"voicemailGreetingText":{"type":"string"},"primary":{"type":"boolean"},"maxRetries":{"type":"integer","format":"int32"},"timeoutSeconds":{"type":"integer","format":"int32"},"fallbackAction":{"type":"string"},"fallbackValue":{"type":"string"},"businessHoursEnabled":{"type":"boolean"},"businessTimeZone":{"type":"string"},"businessDays":{"type":"array","items":{"type":"string"}},"businessOpenLocal":{"type":"string"},"businessCloseLocal":{"type":"string"},"afterHoursGreetingText":{"type":"string"},"afterHoursAction":{"type":"string"},"afterHoursValue":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionPayload"}}}},"VoicePhoneNumberPayload":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"provider":{"type":"string"},"providerNumberId":{"type":"string"},"e164Number":{"type":"string"},"label":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"primary":{"type":"boolean"},"status":{"type":"string"}}},"VoiceRingGroupPayload":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"routingStrategy":{"type":"string"},"timeoutSeconds":{"type":"integer","format":"int32"},"voicemailEnabled":{"type":"boolean"},"members":{"type":"array","items":{"$ref":"#/components/schemas/MemberPayload"}}}},"V1UsageReportResponse":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"totalSmsCount":{"type":"integer","format":"int64"},"totalEmailCount":{"type":"integer","format":"int64"},"awsCost":{"type":"number"},"hqMarkup":{"type":"number"},"finalCharges":{"type":"number"},"freshnessState":{"type":"string"},"freshnessReason":{"type":"string"}}},"MerchantSmsRegistrationStatusView":{"type":"object","properties":{"merchantId":{"type":"string"},"readyToSend":{"type":"boolean"},"blockingReason":{"type":"string"},"brands":{"type":"array","items":{"$ref":"#/components/schemas/BrandView"}},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/CampaignView"}},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberView"}}}},"AlertView":{"type":"object","properties":{"merchantId":{"type":"string"},"channel":{"type":"string"},"alertType":{"type":"string"},"severity":{"type":"string"},"message":{"type":"string"},"thresholdPercent":{"type":"integer","format":"int32"},"createdAt":{"type":"string"}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"Merchant or tenant API key","name":"X-API-KEY","in":"header"},"ApiSecretAuth":{"type":"apiKey","description":"Merchant or tenant API secret","name":"X-API-SECRET","in":"header"},"BearerAuth":{"type":"http","description":"Dashboard session bearer token","scheme":"bearer","bearerFormat":"JWT"}}}}