# HMS Sovereign ## Docs - [Introduction](https://doc.hmsovereign.com/quickstart/introduction.md): - Get started [Quickstart](https://doc.hmsovereign.com/quickstart.md): - Get started [Authentication](https://doc.hmsovereign.com/quickstart/authentication.md): - Core concepts [Agents](https://doc.hmsovereign.com/core-concepts/agents.md): - Core concepts [Phone numbers](https://doc.hmsovereign.com/core-concepts/numbers.md): - Core concepts [Calls](https://doc.hmsovereign.com/core-concepts/calls.md): - Core concepts [Webhooks](https://doc.hmsovereign.com/core-concepts/webhooks.md): - Webhooks [Overview](https://doc.hmsovereign.com/webhooks-doc/overview.md): - Webhooks [Assistant request](https://doc.hmsovereign.com/webhooks-doc/assistant-request.md): - Webhooks [Tool calls](https://doc.hmsovereign.com/webhooks-doc/tool-calls.md): - Webhooks [Status update](https://doc.hmsovereign.com/webhooks-doc/status-update.md): - Webhooks [End of call report](https://doc.hmsovereign.com/webhooks-doc/end-of-call-reports.md): - Webhooks [Security](https://doc.hmsovereign.com/webhooks-doc/security.md): - Guides [Campaigns](https://doc.hmsovereign.com/guides/campaigns.md): - Guides [xAI Realtime Integration](https://doc.hmsovereign.com/guides/realtime-integration.md): - Guides [Voice selection psychology](https://doc.hmsovereign.com/guides/voice-selection-psychology.md): - Guides [Analysis templates](https://doc.hmsovereign.com/guides/analysis-templates.md): - Guides [BYOK Setup](https://doc.hmsovereign.com/guides/byok-setup.md): - Guides [Call analysis](https://doc.hmsovereign.com/guides/call-analysis.md): - Guides [Call Transfers](https://doc.hmsovereign.com/guides/call-transfers.md): - Guides [Custom Tools](https://doc.hmsovereign.com/guides/custom-tools.md): - Guides [Sip Trunks](https://doc.hmsovereign.com/guides/sip-trunks.md): - Guides [Tool templates](https://doc.hmsovereign.com/guides/tool-templates.md): - Guides [Voicemail detection](https://doc.hmsovereign.com/guides/voicemail-detection.md): - Guides [Autonomous silence detection](https://doc.hmsovereign.com/guides/autonomous-silence-detection.md): - Guides [Billing](https://doc.hmsovereign.com/guides/billing.md): - Guides [Error codes](https://doc.hmsovereign.com/guides/error-codes.md): - Guides [Rate limits](https://doc.hmsovereign.com/guides/rate-limits.md): - Guides [Troubleshooting](https://doc.hmsovereign.com/guides/troubleshooting.md): - Api's [Campaigns](https://doc.hmsovereign.com/campaigns-1915439m0.md): - Api's [Agents](https://doc.hmsovereign.com/api-doc/agents.md): - Api's [Voices](https://doc.hmsovereign.com/api-doc/voices.md): - Api's [BYOK](https://doc.hmsovereign.com/api-doc/byok.md): - Api's [Analysis templates](https://doc.hmsovereign.com/api-doc/analysis-templates.md): - Api's [Tool templates](https://doc.hmsovereign.com/api-doc/tool-templates.md): - Api's [Organization](https://doc.hmsovereign.com/api-doc/organization.md): - Api's [Phone numbers](https://doc.hmsovereign.com/api-doc/numbers.md): - Api's [Sip trunks](https://doc.hmsovereign.com/api-doc/sip-trunks.md): - Api's [Calls](https://doc.hmsovereign.com/api-doc/calls.md): - Api's [Call control](https://doc.hmsovereign.com/api-doc/call-control.md): - Api's [Usage](https://doc.hmsovereign.com/api-doc/usage.md): - Api's [Domains](https://doc.hmsovereign.com/api-doc/domains.md): ## API Docs - Agents [List all agents](https://doc.hmsovereign.com/api-reference/assistants/list.md): Retrieve all AI voice agents in your organization. - Agents [Create a new agent](https://doc.hmsovereign.com/api-reference/assistants/create.md): Create a new AI voice agent with custom STT, LLM, and TTS configurations. Only the name is required - defaults will be applied for other settings. - Agents [Get an agent](https://doc.hmsovereign.com/api-reference/assistants/get.md): Retrieve a specific agent by ID. - Agents [Update an agent](https://doc.hmsovereign.com/api-reference/assistants/update.md): Update an existing agent. Only provided fields will be updated. - Agents [Delete an agent](https://doc.hmsovereign.com/api-reference/assistants/delete.md): Delete an agent. Any phone numbers assigned to this agent will have their agent_id set to null. - Tool Templates [List all tool templates](https://doc.hmsovereign.com/api-reference/tools/list.md): Retrieve all tool templates in your organization. - Tool Templates [Create a new tool template](https://doc.hmsovereign.com/api-reference/tools/create.md): Create a new reusable tool template. Tools can be of type 'function' (custom webhook), 'endCall' (built-in), or 'transferCall' (built-in). - Tool Templates [Get a tool template](https://doc.hmsovereign.com/api-reference/tools/get.md): Retrieve a specific tool template by ID. - Tool Templates [Update a tool template](https://doc.hmsovereign.com/api-reference/tools/update.md): Update an existing tool template. Only provided fields will be updated. - Tool Templates [Delete a tool template](https://doc.hmsovereign.com/api-reference/tools/delete.md): Delete a tool template. Note that agents using this tool will continue to work as tools are stored as objects in the agent configuration, not as references. - Numbers [List all phone numbers](https://doc.hmsovereign.com/api-reference/numbers/list.md): Retrieve all phone numbers in your organization with their assigned agents and transfer trunks. - Numbers [Register a phone number](https://doc.hmsovereign.com/api-reference/numbers/create.md): Register a new phone number in your organization. The number must be configured with your SIP provider to forward calls to HMS Sovereign. - Numbers [Get a phone number](https://doc.hmsovereign.com/api-reference/numbers/get.md): Retrieve a specific phone number by ID. - Numbers [Update a phone number](https://doc.hmsovereign.com/api-reference/numbers/update.md): Update agent assignment or transfer trunk for a phone number. - Numbers [Delete a phone number](https://doc.hmsovereign.com/api-reference/numbers/delete.md): Remove a phone number from your organization. - Calls [List calls](https://doc.hmsovereign.com/api-reference/calls/list.md): Retrieve call history with optional filtering by status and date range. Returns complete call data including transcripts, analysis results, and metadata. - Calls [Get call by ID](https://doc.hmsovereign.com/api-reference/calls/get.md): Retrieve complete details for a specific call including transcript, analysis results, and all metadata. - Calls [Initiate outbound call](https://doc.hmsovereign.com/api-reference/calls/create.md): Initiate an outbound call from an AI agent to a destination phone number. - Call Control [Send control command to active call](https://doc.hmsovereign.com/api-reference/call-control/create.md): Send real-time commands to an active call. The call must be in "in-progress" status. - Usage [Get usage logs](https://doc.hmsovereign.com/api-reference/usage/get.md): Retrieve your organization's usage logs with billing information and optional date filtering. - SIP Trunks [List SIP trunks](https://doc.hmsovereign.com/api-reference/sip-trunks/list.md): Retrieve all SIP trunks configured for your organization's call transfers. - SIP Trunks [Create a SIP trunk](https://doc.hmsovereign.com/api-reference/sip-trunks/create.md): Create a new SIP trunk for call transfers. Passwords are stored securely in Vault. - SIP Trunks [Get a SIP trunk](https://doc.hmsovereign.com/api-reference/sip-trunks/get.md): Retrieve a specific SIP trunk by ID. - SIP Trunks [Delete a SIP trunk](https://doc.hmsovereign.com/api-reference/sip-trunks/delete.md): Delete a SIP trunk. Any numbers using this trunk for transfers will have their transfer_trunk_id set to null. - Voices [List available voices](https://doc.hmsovereign.com/api-reference/voices/list.md): Returns available voices for your agents. - BYOK [Get BYOK configurations](https://doc.hmsovereign.com/api-reference/byok/.md): Retrieve all Bring Your Own Key configurations for your organization. - BYOK [Add BYOK configuration](https://doc.hmsovereign.com/api-reference/byok/create.md): Add or update a Bring Your Own Key configuration. The API key is securely stored in Supabase Vault and only the vault secret ID is stored in the database. - BYOK [Delete BYOK configuration](https://doc.hmsovereign.com/api-reference/byok/delete.md): Remove a Bring Your Own Key configuration. This will delete the secret from Vault and remove the reference from the database. - BYOK [Get BYOK provider configurations](https://doc.hmsovereign.com/api-reference/byok-config/list.md): Retrieve available BYOK providers and their supported models - Domains [Get your domain](https://doc.hmsovereign.com/api-reference/domains/list.md): Retrieve your organization's configured email domain from Resend. Requires a Resend API key to be configured via BYOK (Bring Your Own Key). Returns null if no domain is configured. - Domains [Add a domain](https://doc.hmsovereign.com/api-reference/domains/create.md): Create a custom email domain in Resend for sending notifications from your organization. Requires a Resend API key configured via BYOK. You can only have one domain configured per organization. - Domains [Delete your domain](https://doc.hmsovereign.com/api-reference/domains/delete.md): Remove your organization's configured email domain from both the database and Resend. - Domains [List available Resend domains](https://doc.hmsovereign.com/api-reference/domains/sync/list.md): Fetch all domains configured in your Resend account. Use this to see which domains you can select for your organization's email notifications. Requires a Resend API key configured via BYOK. - Domains [Select and sync a Resend domain](https://doc.hmsovereign.com/api-reference/domains/sync/create.md): Select a domain from your Resend account to use for your organization's email notifications. This syncs the domain configuration to your organization. - Domains [Verify domain DNS records](https://doc.hmsovereign.com/api-reference/domains/verify.md): Trigger domain verification in Resend to check if DNS records are correctly configured. This updates the domain status based on Resend's verification results. - Domains [Refresh domain status](https://doc.hmsovereign.com/api-reference/domains/refresh.md): Fetch the latest domain status from Resend and update your local configuration. Use this to check if verification has completed or if any records need attention. - Webhooks [Dynamic assistant configuration webhook](https://doc.hmsovereign.com/webhook/assistant-request.md): Called **BEFORE** an inbound call is answered, allowing you to: - Webhooks [Tool/Function Call](https://doc.hmsovereign.com/webhook/tool-calls.md): Called when the AI needs to execute a tool/function during the conversation. - Webhooks [Call Status Update](https://doc.hmsovereign.com/webhook/status-update.md): Called when the call status changes. Use this to track call lifecycle. - Webhooks [End of Call Report](https://doc.hmsovereign.com/webhook/end-of-call-report.md): Called after the call ends with a summary and optional structured analysis. - Analysis Templates [List analysis templates](https://doc.hmsovereign.com/api-reference/analysis-templates/list.md): Get all analysis templates for your organization - Analysis Templates [Create analysis template](https://doc.hmsovereign.com/api-reference/analysis-templates/create.md): Create a new analysis template for your organization - Analysis Templates [Get analysis template](https://doc.hmsovereign.com/api-reference/analysis-templates/get.md): Retrieve a specific analysis template by ID - Analysis Templates [Update analysis template](https://doc.hmsovereign.com/api-reference/analysis-templates/update.md): Update an existing analysis template - Analysis Templates [Delete analysis template](https://doc.hmsovereign.com/api-reference/analysis-templates/delete.md): Delete an analysis template - Organization [Get organization information](https://doc.hmsovereign.com/get-organization-information-27383947e0.md): Retrieve your organization details including balance, usage statistics, and resource counts. Use `include_children=true` to also list child organizations (for agencies). - Organization [Create organization](https://doc.hmsovereign.com/create-organization-27383948e0.md): Create a new organization. If `parent_org_id` is provided, creates a child organization that bills to the parent (for whitelabel use cases). The API key for the new organization is only returned once at creation time. - Organization [Get organization information (deprecated)](https://doc.hmsovereign.com/api-reference/account/get.md): **Deprecated:** Use `/organizations` instead. Retrieve your organization details including balance, usage statistics, and resource counts. - Campaigns [List all campaigns](https://doc.hmsovereign.com/api-reference/campaigns/list.md): Retrieve all outbound campaigns in your organization. - Campaigns [Create a campaign](https://doc.hmsovereign.com/api-reference/campaigns/create.md): Create a new outbound calling campaign with leads and schedule. - Campaigns [Get a campaign](https://doc.hmsovereign.com/api-reference/campaigns/get.md): Retrieve a specific campaign by ID. - Campaigns [Update a campaign](https://doc.hmsovereign.com/api-reference/campaigns/update.md): Update campaign settings or status. Set status to `scheduled` to start calling. - Campaigns [Delete a campaign](https://doc.hmsovereign.com/api-reference/campaigns/delete.md): Delete a campaign and all its leads. - Campaigns [List campaign leads](https://doc.hmsovereign.com/api-reference/campaigns/leads/list.md): Retrieve all leads in a campaign. - Campaigns [Add a lead](https://doc.hmsovereign.com/api-reference/campaigns/leads/create.md): Add a new lead to a campaign. - Campaigns [Remove a lead](https://doc.hmsovereign.com/api-reference/campaigns/leads/delete.md): Remove a lead from a campaign. ## Schemas - [Error](https://doc.hmsovereign.com/error-11612360d0.md): - [Pagination](https://doc.hmsovereign.com/pagination-11612361d0.md): - [UUID](https://doc.hmsovereign.com/uuid-11612362d0.md): - [Timestamp](https://doc.hmsovereign.com/timestamp-11612363d0.md): - [SuccessResponse](https://doc.hmsovereign.com/successresponse-11612364d0.md): - [STTConfig](https://doc.hmsovereign.com/sttconfig-11612365d0.md): - [LLMConfig](https://doc.hmsovereign.com/llmconfig-11612366d0.md): - [TTSConfig](https://doc.hmsovereign.com/ttsconfig-11612367d0.md): - [XAIRealtimeConfig](https://doc.hmsovereign.com/xairealtimeconfig-11832803d0.md): - [Agent](https://doc.hmsovereign.com/agent-11612368d0.md): - [AgentCreate](https://doc.hmsovereign.com/agentcreate-11612369d0.md): - [AgentUpdate](https://doc.hmsovereign.com/agentupdate-11612370d0.md): - [PhoneNumber](https://doc.hmsovereign.com/phonenumber-11612371d0.md): - [PhoneNumberCreate](https://doc.hmsovereign.com/phonenumbercreate-11612372d0.md): - [PhoneNumberUpdate](https://doc.hmsovereign.com/phonenumberupdate-11612373d0.md): - [Call](https://doc.hmsovereign.com/call-11612374d0.md): - [CallControlCommand](https://doc.hmsovereign.com/callcontrolcommand-11612375d0.md): - [InjectContextCommand](https://doc.hmsovereign.com/injectcontextcommand-11612376d0.md): - [SayCommand](https://doc.hmsovereign.com/saycommand-11612377d0.md): - [EndCallCommand](https://doc.hmsovereign.com/endcallcommand-11612378d0.md): - [TransferCommand](https://doc.hmsovereign.com/transfercommand-11612379d0.md): - [CallControlResponse](https://doc.hmsovereign.com/callcontrolresponse-11612380d0.md): - [OutboundCallRequest](https://doc.hmsovereign.com/outboundcallrequest-11613107d0.md): - [Account](https://doc.hmsovereign.com/account-11612381d0.md): - [UsageLog](https://doc.hmsovereign.com/usagelog-11612382d0.md): - [OutboundCallResponse](https://doc.hmsovereign.com/outboundcallresponse-11613108d0.md): - [UsageSummary](https://doc.hmsovereign.com/usagesummary-11612383d0.md): - [Organization](https://doc.hmsovereign.com/organization-11811819d0.md): - [SipTrunk](https://doc.hmsovereign.com/siptrunk-11612384d0.md): - [SipTrunkCreate](https://doc.hmsovereign.com/siptrunkcreate-11612385d0.md): - [OrganizationChild](https://doc.hmsovereign.com/organizationchild-12636276d0.md): - [Voice](https://doc.hmsovereign.com/voice-11612898d0.md): - [OrganizationCreate](https://doc.hmsovereign.com/organizationcreate-12636277d0.md): - [OrganizationCreated](https://doc.hmsovereign.com/organizationcreated-12636278d0.md): - [AssistantRequestPayload](https://doc.hmsovereign.com/assistantrequestpayload-11624678d0.md): - [CallObject](https://doc.hmsovereign.com/callobject-11624682d0.md): - [Customer](https://doc.hmsovereign.com/customer-11624683d0.md): - [AssistantRequestResponse](https://doc.hmsovereign.com/assistantrequestresponse-11624679d0.md): - [XAIRealtimeVoice](https://doc.hmsovereign.com/xairealtimevoice-11832804d0.md): - [AssistantConfigOverride](https://doc.hmsovereign.com/assistantconfigoverride-11624680d0.md): - [AnalysisPlan](https://doc.hmsovereign.com/analysisplan-11624681d0.md): - [AssistantWebhookObject](https://doc.hmsovereign.com/assistantwebhookobject-12221729d0.md): - [ToolCallsPayload](https://doc.hmsovereign.com/toolcallspayload-11624684d0.md): - [ToolCall](https://doc.hmsovereign.com/toolcall-11624685d0.md): - [ToolCallsResponse](https://doc.hmsovereign.com/toolcallsresponse-11624686d0.md): - [StatusUpdatePayload](https://doc.hmsovereign.com/statusupdatepayload-11624687d0.md): - [EndOfCallReportPayload](https://doc.hmsovereign.com/endofcallreportpayload-11624688d0.md): - [ToolDefinition](https://doc.hmsovereign.com/tooldefinition-11624689d0.md): - [EndCallTool](https://doc.hmsovereign.com/endcalltool-11624690d0.md): - [TransferCallTool](https://doc.hmsovereign.com/transfercalltool-11624691d0.md): - [WebhookHeaders](https://doc.hmsovereign.com/webhookheaders-11624692d0.md): - [XAIRealtimeWebhookNotes](https://doc.hmsovereign.com/xairealtimewebhooknotes-11832805d0.md): - [ToolFunctionConfig](https://doc.hmsovereign.com/toolfunctionconfig-11905043d0.md): - [ToolTransferConfig](https://doc.hmsovereign.com/tooltransferconfig-11905044d0.md): - [ToolTemplate](https://doc.hmsovereign.com/tooltemplate-11905045d0.md): - [ToolTemplateCreate](https://doc.hmsovereign.com/tooltemplatecreate-11905046d0.md): - [ToolTemplateUpdate](https://doc.hmsovereign.com/tooltemplateupdate-11905047d0.md): - [AnalysisTemplate](https://doc.hmsovereign.com/analysistemplate-11906239d0.md): - [CreateAnalysisTemplate](https://doc.hmsovereign.com/createanalysistemplate-11906240d0.md): - [UpdateAnalysisTemplate](https://doc.hmsovereign.com/updateanalysistemplate-11906241d0.md): - [AnalysisTemplateListResponse](https://doc.hmsovereign.com/analysistemplatelistresponse-11906242d0.md): - [CampaignLead](https://doc.hmsovereign.com/campaignlead-12128121d0.md): - [Campaign](https://doc.hmsovereign.com/campaign-12128122d0.md): - [CampaignCreate](https://doc.hmsovereign.com/campaigncreate-12128123d0.md): - [CampaignUpdate](https://doc.hmsovereign.com/campaignupdate-12128124d0.md): - [CampaignLeadCreate](https://doc.hmsovereign.com/campaignleadcreate-12128125d0.md):