1. Getting started
my.host API
  • Getting started
    • Introduction
    • Base url
    • Authentication
    • Response codes
    • Changelog
  • Domains
    • Domains
      • DNS
        • Zone
          • Get DNS zonefile
          • Import DNS zonefile
        • Dynamic DNS
          • List Dynamic DNS credentials
          • Create Dynamic DNS credential
          • Delete Dynamic DNS credential
          • Reset Dynamic DNS password
        • Get DNS records
        • Update DNS records
        • Update single DNS record
        • Delete single DNS record
        • Add single DNS record
        • Get DNS history
      • List domains
      • Get domain
      • Update domain
      • Cancel domain
      • Cancel domain deletion
      • Get auth code
      • Retry registration or transfer
      • Resend owner verification
    • Contacts
      • List profiles
      • Get profile
      • Create profile
      • Update profile
      • Delete profile
      • Get profile
      • Update profile
    • Nameservers
      • List profiles
      • Get profile
      • Create profile
      • Update profile
      • Delete profile
    • DNS templates
      • List templates
      • Get template
      • Create template
      • Update template
      • Delete template
    • Availability
      • Check domain availability
      • Check availability of several domains
    • Order
      • Order domain
    • Extensions
      • List domain extensions
      • Get domain extension
  • Virtual Private Servers
    • Backups
      • List backups
      • Create backup
      • Restore backup
      • Delete backup
    • SSH keys
      • List SSH keys
      • Delete SSH key
      • Add SSH key
    • Firewall
      • Get VPS firewall
      • Update VPS firewall
    • VPC
      • Get VPS VPC
      • Create VPS VPC
      • Add VPC subnet
      • Attach VPC subnet
    • Order
      • List VPS products
      • Order VPS
    • Floating IPs
      • List floating IPs
      • Reserve floating IP
      • Attach floating IP
      • Detach floating IP
      • Delete floating IP
    • List VPS instances
      GET
    • VPS details
      GET
    • Update VPS
      PUT
    • Restart VPS
      POST
    • Enable or disable rescue mode
      PUT
    • Cancel VPS
      DELETE
    • Cancel VPS deletion
      PUT
    • List available OS images
      GET
    • Reinstall VPS
      POST
    • Start VPS
      POST
    • Stop VPS
      POST
    • Power off VPS
      POST
    • Reset VPS root password
      POST
    • Change VPS hostname
      PUT
    • Get VPS statistics
      GET
    • List VPS licenses
      GET
  • Certificates
    • List certificates
    • Get certificate
    • List certificate products
    • Order certificate
    • Generate CSR
    • Request certificate
  • Orders
    • List orders
    • Get order
    • Update order
  • Affiliate
    • Commissions
      • List affiliate commissions
      • Get affiliate commission
    • Payments
      • List affiliate payments
      • Get affiliate payment
  • Account
    • Profile
      • Get account profile
      • Update account profile
    • Payment methods
      • List payment methods
      • Update default payment method
    • Invoices
      • List invoices
      • Get invoice
      • Download invoice PDF
    • Users
      • List account users
      • Get account user
      • Create account user
      • Update account user
    • Tickets
      • List support tickets
      • Get support ticket
      • Create support ticket
      • Reply to support ticket
  • Tools
    • Get your IP and customer number
  1. Getting started

Authentication

Every request to the my.host API needs one credential: a personal access token. Create one in the control panel under My account → API access. API keys are deprecated: new ones can no longer be created, and existing keys keep working.
CredentialHeaderCan do
Personal access tokenAuthorization: Bearer mh_pat_…Only the permissions chosen for the token, and never more than the user who created it. Expires after the period you choose (7 days to a year), or has no expiry date. Optionally limited to IP addresses or subnets.
API key (deprecated)API-Key: <key>Everything the user who created it may do. Optionally limited to IP addresses.
A token without an expiry date suits integrations that run unattended, such as WHMCS or automatic certificate renewal. Such a token is revoked after 12 months without use; the user who created it gets an e-mail 30 days before. Using the token again keeps it.
To replace an API key, create a token and put it where the key was: a token also works in the API-Key header.
Send one of the two, not both. Clients that can only send a bearer credential may also send an API key as Authorization: Bearer <key>. Clients that can only send an API-Key header, such as older versions of our WHMCS module, may send a token there: API-Key: mh_pat_….
A credential belongs to the user who created it. When the main user of the account changes that user's permissions, the change applies at once to that user's API keys and tokens.

API key (deprecated)#

Personal access token#

A token is shown once, when you create it: we only store a fingerprint (hash) of it. You can revoke a token at any time in the control panel; it stops working immediately.

Token permissions (scopes)#

When you create a token you choose, per section, what it may do. In the API these are scopes of the form <section>:<level>, for example domains:read or vps:write. Every level includes read for the same section.
LevelIn the control panelAllows
readViewViewing data.
writeChangeChanges that cost nothing but take effect at once, such as DNS records, starting or restarting a VPS, firewall rules, replying to a ticket.
purchaseOrderAnything that costs money: orders, renewals, upgrades, reserving a floating IP.
criticalHigh impactActions you cannot undo and confidential data: deleting or cancelling, reinstalling, restoring a backup, changing the owner of a domain name, auth codes, root and rescue passwords, managing users.
The sections are domains, domains-profiles, domains-nameservers, domains-dns-templates, vps, vps-ssh-keys, vps-floating-ips, certificates, order, account-profile, account-paymethods, account-invoices, account-tickets, account-users and account-affiliate.

Errors#

StatusMeaning
401 UnauthorizedNo credential, an unknown or expired credential, a revoked token, or a key or token used from an IP address outside its whitelist.
403 ForbiddenThe credential is valid but may not call this endpoint: the user lacks the permission, or the token lacks the scope.
With 401 and 403 the response has a WWW-Authenticate header as described in RFC 6750. For a missing scope it names the scope:

Security best practices#

Keep credentials confidential. Treat API keys and tokens as passwords. Do not share them or put them in client-side code.
Give a token only what it needs. Choose the fewest sections and levels, and a short lifetime. Only give High impact when the integration really needs it.
Revoke what you no longer use. Revoke a token or deactivate an API key in the control panel as soon as you suspect it has leaked.
Modified at 2026-11-13 09:40:29
Previous
Base url
Next
Response codes
Built with