# x-shc-release: version=2.4.25 op_fingerprint=1d9dbe9b2226eacbb1a53e3ec171f78cbeae113fa89487119fb41404f3fdbadb op_count=179 contractFingerprint=2a279c934c85de3025221ddb75962c732ceb6c153f987246509fb8fcf33e7cdc # Sovereign Hybrid Compute User API Version: 2.4.25 Operation count: 179 Operation fingerprint: 1d9dbe9b2226eacbb1a53e3ec171f78cbeae113fa89487119fb41404f3fdbadb Contract fingerprint: 2a279c934c85de3025221ddb75962c732ceb6c153f987246509fb8fcf33e7cdc Source of truth: openapi.json. This file is generated from it and always describes the same release. ## Agent Primer - Base path: `https://blesta.sovereignhybridcompute.com/user-api/v2`. - Path parameters keep the live lowerCamelCase names (`serviceId`, `invoiceId`, `ticketId`, ...). Query parameters keep the live handler names; most are camelCase, with documented handler exceptions such as `category_id`. - Request bodies use the live /v2 snake_case field names. MCP callers pass the entire JSON body as one nested `body` object. There is no case coercion. - VM orders accept an optional `coupon` string in the request body for preview and submit. The preview amount may not reflect the coupon and must not be treated as the final price; preview does not establish coupon applicability. See `docs/vm-order-coupons.md` for the workflow. - Confirm-gated operations use the `X-User-Api-Confirm` two-step: first call returns 409 `confirmation_required`; after explicit human approval, repeat the identical call with the returned `confirmation_id` in that header. - Idempotency placement is strict: header `Idempotency-Key` is a top-level MCP argument for `buyVirtualMachine` (optional), `createAgentSession` (required), `createEventSubscription` (required), `createVirtualMachineOrder` (optional), `deleteVirtualMachineCloudInit` (required), `registerAccount` (optional), `requestAffiliatePayout` (optional), `resumeVirtualMachine` (required), `standbyVirtualMachine` (required), `submitBatch` (required), `updateVirtualMachineCloudInit` (required); body `idempotency_key` is under `body` for `approveQuotation` (required), `changeAccountPassword` (optional), `changeVirtualMachineTerm` (required), `createServiceAddon` (required), `submitCreditTopup` (required), `submitPaymentCheckout` (required), `submitVirtualMachineRenewal` (required), `upgradeService` (required). Other write operations accept an optional Idempotency-Key; if omitted the server returns a fresh key for later retries. Reads are evaluated live and are not journaled. - MCP live facts: the hosted MCP catalog stamp reports the OpenAPI surface as 179 operations/tools in `serverInfo.catalog.tool_count`; default `tools/list` may return a curated callable subset for clients. - Full per-operation parameters, bodies, responses, and examples are in `docs/operations.md`; this file is intentionally a lean index. ## AI service (private beta) SHC also serves its own open-weight model, **SHC Qwen 3.8 Uncensored** (the model id exactly as `GET /v1/models` reports it), as a private beta inference service. It is a separate service from this user API: a different host, a different key, and OpenAI/Anthropic-compatible front doors. - Base URL: `https://ai.sovereignhybridcompute.com/v1`. - Authentication: `Authorization: Bearer ` on every `/v1/*` request; unauthenticated calls get 401. - Where the key comes from: the API Keys tab of the client area for the AI service (create, copy once, revoke). It is not a user-API `shc_live_` key and not a Blesta password. - Model: one model, id `SHC Qwen 3.8 Uncensored`. It is SHC's own open-weight model, not a resold third-party model. - Request shapes, one per client: - `POST /v1/chat/completions` - OpenAI-compatible chat shape; use with OpenAI-SDK-style clients and OpenCode. - `POST /v1/responses` - OpenAI Responses shape; use with Codex CLI. - `POST /v1/messages` - Anthropic Messages shape; use with Claude Code. - Client setup (env vars, config files, model id, known gateway limits and workarounds): see CLIENT-DOCS.md for the AI service - Claude Code section 1, Codex CLI section 3, OpenCode section 4. - Status: private beta. Capabilities and behavior may change without notice; if a call misbehaves, check `/gateway/health` and `/upstream/health` on the same host before assuming a client problem. ## Operations - [C] `addVirtualMachineFirewallRule` POST `/vm/{serviceId}/firewall/rules` - Create a firewall rule - [C] `applyLiveServiceSshKey` POST `/vm/{serviceId}/ssh-keys/apply-live` - Live-inject an SSH key into a running VM - [CS] `approveQuotation` POST `/quotations/{quotationId}/approve` - Approve an owned quotation and create the resulting invoice or checkout pointer - [K] `beginTwoFactorEnrollment` POST `/account/2fa/enrollment` - Begin two-factor enrollment - [C] `buyVirtualMachine` POST `/vm/buy` - Submit a VM order via the legacy LNVPS-style alias (deprecated) - `cancelPendingOrder` POST `/orders/{orderId}/cancel` - Cancel an owned pending order that has not yet been fulfilled - [C] `cancelVirtualMachine` POST `/vm/{serviceId}/cancel` - Cancel a VM service - [K] `changeAccountPassword` POST `/account/password` - Change account password - [CS] `changeVirtualMachineTerm` PATCH `/vm/{serviceId}/term` - Commit a term change for this virtual machine - `claimAgentKey` POST `/agent-keys/claim` - Claim a single-use agent API key by claim code - [C] `closeSupportTicket` POST `/support/tickets/{ticketId}/close` - Close a support ticket - [K] `createAgentSession` POST `/agent-sessions` - Create PoP-bound agent session token - [K] `createApiKey` POST `/account/api-keys` - Create a scoped, expiring API key. The plaintext key is returned ONCE; store it now. - [C] `createContact` POST `/contacts` - Create a contact - `createEventSubscription` POST `/event-subscriptions` - Create event webhook subscription - [C] `createServiceAddon` POST `/vm/{serviceId}/addons` - Create a service add-on - `createSupportTicket` POST `/support/tickets` - Create a support ticket - `createVirtualMachineBackup` POST `/vm/{serviceId}/backups` - Queue a VM backup - [C] `createVirtualMachineOrder` POST `/ordering/submit` - Submit a VM order - `createVirtualMachineSnapshot` POST `/vm/{serviceId}/snapshots` - Queue a VM snapshot - [C] `deleteContact` DELETE `/contacts/{contactId}` - Delete a contact - `deleteEventSubscription` DELETE `/event-subscriptions/{eventSubscriptionId}` - Delete event webhook subscription - [C] `deleteLiveServiceSshKey` DELETE `/vm/{serviceId}/ssh-keys/live` - Live-remove an SSH key from a running VM - [C] `deleteManager` DELETE `/managers/{ref}` - Revoke a manager or cancel a manager invitation - [C] `deleteServiceSshKey` DELETE `/ssh-key` - Delete stored SSH key for a service - [C] `deleteVirtualMachineBackup` POST `/vm/{serviceId}/backups/delete` - Delete a VM backup - [CD] `deleteVirtualMachineCloudInit` DELETE `/virtual-machines/{virtualMachineId}/cloud-init` - Revert VM cloud-init user-data - [C] `deleteVirtualMachineFirewallRule` DELETE `/vm/{serviceId}/firewall/rules/{pos}` - Delete a firewall rule - [C] `deleteVirtualMachineReverseDns` DELETE `/vm/{serviceId}/rdns` - Clear the PTR for an owned IP - [C] `deleteVirtualMachineSnapshot` POST `/vm/{serviceId}/snapshots/delete` - Delete a VM snapshot - [K] `disableTwoFactor` DELETE `/account/2fa` - Disable two-factor authentication - `downloadClientDocument` GET `/documents/{documentId}/download` - Download an owned document (binary) - `downloadDownloadFile` GET `/downloads/{fileId}/download` - Download an available file (binary) - [K] `enableTwoFactor` POST `/account/2fa` - Enable two-factor authentication - `enrollAffiliate` POST `/affiliate/enroll` - Enroll the account as an affiliate - `getAccount` GET `/account` - Get account profile - `getAccountBalance` GET `/account/balance` - Get account balance (amounts due + credit) - `getAccountPreferences` GET `/account/preferences` - Get notification / billing preferences - `getAffiliateAccount` GET `/affiliate` - Get the affiliate account overview - `getAffiliatePayoutDestination` GET `/affiliate/payout-destination` - Get the affiliate payout destination - [K] `getAgentSession` GET `/agent-sessions/{sessionId}` - Get agent session - `getAutoDebit` GET `/account/autodebit` - Get auto-debit status - `getBillingBalance` GET `/billing/balance` - Get account balance and available credit - `getContact` GET `/contacts/{contactId}` - Get a contact - `getContactPermissionOptions` GET `/contacts/permission-options` - List grantable contact permission areas - `getCreditHandling` GET `/account/credit-handling` - Get low-credit auto-recharge thresholds - `getEmail` GET `/emails/{emailId}` - Get email / notice detail - `getEventSubscription` GET `/event-subscriptions/{eventSubscriptionId}` - Get event webhook subscription - `getInvoice` GET `/invoices/{invoiceId}` - Get invoice detail - `getInvoiceElectronic` GET `/invoices/{invoiceId}/electronic` - Download the electronic representation of an owned invoice (binary) - `getInvoicePdf` GET `/invoices/{invoiceId}/pdf` - Download invoice PDF - `getKbArticle` GET `/kb/{articleId}` - Get a knowledge base article - `getManagerPermissionOptions` GET `/managers/permission-options` - List grantable manager permission areas - [K] `getNostrLinkChallenge` GET `/account/nostr/link-challenge` - Get a short-lived challenge for linking a Nostr public key (Basic+OTP only) - `getOrder` GET `/orders/{orderId}` - Get one owned order - `getOrderingCatalog` GET `/ordering/catalog` - List buyable VM plans for the authenticated customer - `getPayment` GET `/payment/{invoiceId}` - Get invoice detail - `getQuotation` GET `/quotations/{quotationId}` - Get a quotation - `getRenewalQuote` GET `/vm/{serviceId}/renew` - Get renewal quote - `getServiceAddonOptions` GET `/vm/{serviceId}/addons/options` - List add-on options for this service - `getServiceUpgradeOptions` GET `/vm/{serviceId}/upgrade-options` - List available package changes (upgrade/downgrade) - `getSupportTicket` GET `/support/tickets/{ticketId}` - Get a support ticket with replies - `getSupportTicketAttachment` GET `/support/tickets/{ticketId}/attachments/{attachmentId}` - Download an attachment from an owned support ticket (binary) - `getTransaction` GET `/transactions/{transactionId}` - Get transaction detail - [K] `getTwoFactorStatus` GET `/account/2fa` - Get two-factor authentication status - `getVirtualMachine` GET `/vm/{serviceId}` - Get VM detail - `getVirtualMachineBackupRestoreHints` GET `/vm/{serviceId}/backups/restore-hints` - Check backup restore-point encryption status - `getVirtualMachineBandwidth` GET `/vm/{serviceId}/bandwidth` - Get VM bandwidth usage - [C] `getVirtualMachineCredentials` GET `/vm/{serviceId}/credentials` - Get VM Service-Info credentials - `getVirtualMachineDetail` GET `/vm/{serviceId}/detail` - Get enriched VM detail - `getVirtualMachineFirewall` GET `/vm/{serviceId}/firewall` - Get VM firewall - `getVirtualMachineIso` GET `/vm/{serviceId}/iso` - List VM ISO images - `getVirtualMachineJob` GET `/vm/{serviceId}/jobs/{jobId}` - Get one background job - `getVirtualMachineMetrics` GET `/vm/{serviceId}/metrics` - Get VM time-series metrics - `getVirtualMachineNetwork` GET `/vm/{serviceId}/network` - Get VM network interfaces - `getVirtualMachineReverseDns` GET `/vm/{serviceId}/rdns` - List reverse-DNS-eligible IPs for a VM - `getVirtualMachineSnapshotRestoreHints` GET `/vm/{serviceId}/snapshots/restore-hints` - Check snapshot restore-point encryption status - `getVirtualMachineSummary` GET `/vm/{serviceId}/summary` - Get a one-call VM summary - `getVirtualMachineTermOptions` GET `/vm/{serviceId}/term-options` - List available billing terms for this virtual machine - `getVirtualMachineZkBackupStatus` GET `/vm/{serviceId}/zk-backup/status` - Get VM ZK backup status - `getVmConsoleAvailability` GET `/vm/{serviceId}/console` - Probe console availability - `getVmDataPreferences` GET `/vm/{serviceId}/data-preferences` - Get backup/snapshot data preferences - [C] `inviteAccountManager` POST `/managers` - Invite an account manager - [K] `linkNostrIdentity` POST `/account/nostr/link` - Link a Nostr public key after challenge-signature verification (Basic+OTP only) - `listAccountActivity` GET `/account/activity` - List account activity - `listAccountManagers` GET `/managers` - List managers of this account - `listAffiliatePayouts` GET `/affiliate/payouts` - List affiliate payout requests - `listAffiliateReferrals` GET `/affiliate/referrals` - List affiliate referrals - [K] `listAgentSessionAudit` GET `/agent-sessions/{sessionId}/audit` - List agent session audit records - [K] `listAgentSessions` GET `/agent-sessions` - List active agent sessions - `listAiServingKeys` GET `/ai-serving/keys` - List AI Serving key metadata - `listAiServingStatus` GET `/ai-serving` - List active AI Serving services and delivery status - [K] `listApiKeys` GET `/account/api-keys` - List your active API keys (metadata only -- never the key). - `listClientDocuments` GET `/documents` - List documents visible to the authenticated account - `listContacts` GET `/contacts` - List the client's contacts - `listDownloadFiles` GET `/downloads` - List downloadable files available to the authenticated account - `listEmails` GET `/emails` - List email / notice history - `listEventSubscriptions` GET `/event-subscriptions` - List event webhook subscriptions - `listEvents` GET `/events` - List customer events - `listImages` GET `/image` - List OS images only - `listInvoices` GET `/invoices` - List account invoices - `listKbCategories` GET `/kb` - List knowledge base categories and articles - `listManagedAccounts` GET `/managed-accounts` - List accounts I manage - `listOrders` GET `/orders` - List orders visible to the authenticated account, including pending orders - `listPaymentMethods` GET `/payment-methods` - List stored payment methods - `listQuotationInvoices` GET `/quotations/{quotationId}/invoices` - List invoices generated from a quotation - `listQuotations` GET `/quotations` - List the client's quotations - `listServiceAddons` GET `/vm/{serviceId}/addons` - List add-ons attached to this service - `listServiceSshKeys` GET `/ssh-key` - List stored SSH keys - `listSupportDepartments` GET `/support/departments` - List support departments visible to the client - `listSupportTickets` GET `/support/tickets` - List the client's support tickets - `listTemplates` GET `/vm/templates` - List available OS templates and plans - `listTransactions` GET `/transactions` - List transactions - `listVirtualMachineActivity` GET `/vm/{serviceId}/activity` - List VM activity (Proxmox task history) - `listVirtualMachineBackups` GET `/vm/{serviceId}/backups` - List VM backups - `listVirtualMachineJobs` GET `/vm/{serviceId}/jobs` - List background jobs for a VM - `listVirtualMachinePayments` GET `/vm/{serviceId}/payments` - List VM invoices - `listVirtualMachineSnapshots` GET `/vm/{serviceId}/snapshots` - List VM snapshots - `listVirtualMachineZkBackupRecipients` GET `/vm/{serviceId}/zk-backup/recipients` - List VM ZK backup recipients - `listVirtualMachines` GET `/vm` - List customer VMs - `listVmFileRestoreEntries` GET `/vm/{serviceId}/file-restore/list` - Browse files in a restore point - `listVmFileRestoreSources` GET `/vm/{serviceId}/file-restore/sources` - List file-restore sources - [C] `mintVmConsoleSession` POST `/vm/{serviceId}/console/session` - Mint a live console session - [C] `mountVirtualMachineIso` POST `/vm/{serviceId}/iso/mount` - Mount an ISO image - `previewServiceAddon` POST `/vm/{serviceId}/addons/preview` - Preview a service add-on - `previewServiceUpgrade` POST `/vm/{serviceId}/upgrade/preview` - Preview a package change (prorated, no charge, no change) - `previewVirtualMachineOrder` POST `/ordering/preview` - Preview a VM order request - `previewVirtualMachineStandby` GET `/vm/{serviceId}/standby/preview` - Preview standby pricing for a VM - `previewVirtualMachineTermChange` POST `/vm/{serviceId}/term/preview` - Preview the billing impact of a term change without committing it - `registerAccount` POST `/register` - Create a customer account and receive a usable API key in one anonymous call. - [C] `registerVirtualMachineZkBackup` POST `/vm/{serviceId}/zk-backup/register` - Register a VM ZK backup recipient set - [C] `reinstallVirtualMachine` PATCH `/vm/{serviceId}/reinstall` - Reinstall a VM - [C] `rekeyVirtualMachineZkBackup` POST `/vm/{serviceId}/zk-backup/rekey` - Rekey (rotate) a VM's zero-knowledge backup registration - [C] `rekeyVirtualMachineZkBackupWithRetention` POST `/vm/{serviceId}/zk-backup/rekey-retain` - Rekey VM ZK backup while retaining chosen recipients - [C] `relinquishManagedAccount` DELETE `/managed-accounts/{managedClientId}` - Relinquish a managed account - `replySupportTicket` POST `/support/tickets/{ticketId}/replies` - Reply to a support ticket - [C] `requestAffiliatePayout` POST `/affiliate/payouts` - Request an affiliate payout - `resetVirtualMachine` PATCH `/vm/{serviceId}/reset` - Hard-reset a VM - [C] `respondToManagedAccountInvitation` POST `/managed-accounts/invitations/{token}` - Accept or decline a management invitation - `restartVirtualMachine` PATCH `/vm/{serviceId}/restart` - Restart a VM - [C] `restoreVirtualMachineBackup` POST `/vm/{serviceId}/backups/restore` - Restore a VM from backup - [C] `restoreVirtualMachineSnapshot` POST `/vm/{serviceId}/snapshots/restore` - Restore a VM from snapshot - [CS] `resumeVirtualMachine` POST `/vm/{serviceId}/resume` - Resume a VM from standby - [CDK] `revokeAgentSession` DELETE `/agent-sessions/{sessionId}` - Revoke agent session - [CK] `revokeApiKey` DELETE `/account/api-keys/{keyId}` - Revoke an API key (idempotent). - [C] `revokeVirtualMachineZkBackupRecipient` POST `/vm/{serviceId}/zk-backup/revoke` - Revoke a VM ZK backup recipient for future seals - `searchKb` GET `/kb/search` - Search knowledge base articles - [C] `setServiceSshKey` POST `/ssh-key` - Set stored SSH key for a service - [C] `setVirtualMachineBackupProtection` PATCH `/vm/{serviceId}/backups/protection` - Set backup protection - [C] `setVirtualMachineReverseDns` POST `/vm/{serviceId}/rdns` - Set or replace the PTR for an owned IP - [C] `setVirtualMachineSnapshotProtection` PATCH `/vm/{serviceId}/snapshots/protection` - Set snapshot protection - `shutdownVirtualMachine` PATCH `/vm/{serviceId}/shutdown` - Gracefully shut down a VM - [CSD] `standbyVirtualMachine` POST `/vm/{serviceId}/standby` - Park a VM in standby - `startVirtualMachine` PATCH `/vm/{serviceId}/start` - Start a VM - `stopVirtualMachine` PATCH `/vm/{serviceId}/stop` - Stop a VM - `submitBatch` POST `/batch` - Submit batch sub-requests - [C] `submitCreditTopup` POST `/account/credit` - Add account credit (top up) via BTCPay - [C] `submitPaymentCheckout` POST `/payment/{invoiceId}/checkout` - Create or replay a BTCPay checkout for an owned invoice - `submitSupportTicketFeedback` POST `/support/tickets/{ticketId}/feedback` - Record feedback for an owned support ticket - [C] `submitVirtualMachineRenewal` POST `/vm/{serviceId}/renew` - Commit a service renewal - [CD] `switchManagedAccount` POST `/managed-accounts/{managedClientId}/switch` - Switch into a managed account - [K] `unlinkNostrIdentity` POST `/account/nostr/unlink` - Unlink the Nostr identity from the authenticated account (Basic+OTP only) - [C] `unmountVirtualMachineIso` POST `/vm/{serviceId}/iso/unmount` - Unmount an ISO image - [K] `updateAccount` PATCH `/account` - Update account profile - [K] `updateAccountContact` PATCH `/account/contact` - Update primary contact profile - `updateAccountManager` PATCH `/managers/{ref}` - Update manager permissions or invitation metadata - [C] `updateAccountPreferences` PATCH `/account/preferences` - Update account preferences - [C] `updateAffiliatePayoutDestination` PUT `/affiliate/payout-destination` - Set the affiliate payout destination - `updateContact` PATCH `/contacts/{contactId}` - Update a client-owned contact (confirm required for permission, login, or email changes) - [C] `updateCreditHandling` PUT `/account/credit-handling` - Replace credit-handling thresholds - [K] `updateNip05` PATCH `/account/nostr/nip05` - Update the NIP-05 identifier for the linked Nostr identity (Basic+OTP only) - [CD] `updateVirtualMachineCloudInit` PATCH `/virtual-machines/{virtualMachineId}/cloud-init` - Apply VM cloud-init user-data - [C] `updateVirtualMachineFirewallPolicy` PATCH `/vm/{serviceId}/firewall/policy` - Set the default firewall policy - [C] `updateVirtualMachineFirewallRule` PATCH `/vm/{serviceId}/firewall/rules/{pos}` - Edit a firewall rule - `updateVmDataPreferences` PATCH `/vm/{serviceId}/data-preferences` - Update backup/snapshot data preferences - [C] `upgradeService` PATCH `/vm/{serviceId}/upgrade` - Change a VM package (upgrade/downgrade) -- queued, awaiting payment - `validateVirtualMachineCloudInit` POST `/virtual-machines/{virtualMachineId}/cloud-init/validate` - Validate VM cloud-init user-data - `verifyVirtualMachineBackup` POST `/vm/{serviceId}/backups/verify` - Acknowledge a backup verify - `verifyVirtualMachineSnapshot` POST `/vm/{serviceId}/snapshots/verify` - Acknowledge a snapshot verify