Developers
REST-API
Automate domains, DNS, invoices, tickets, CDN, deployments and shop orders. OpenAPI file for Postman & co.
Quick start
- In the customer portal under API create a token with the required permissions.
- Send the token as a header:
Authorization: Bearer hgg_… - Responses are JSON: success
{ data, meta? }, errors{ error: { code, message } }.
curl https://hoster.gg/api/v1/domains \ -H "Authorization: Bearer hgg_…"
Base URL: https://hoster.gg/api/v1 · at most 120 requests per minute and token · lists with ?limit= (max. 100) and ?page=
Permissions
| account:read | Read account and customer data |
| domains:read | Read domains and DNS records |
| dns:write | Create, change and delete DNS records |
| hosting:read | Read web hosting plans |
| billing:read | Read invoices and contracts |
| websites:read | Read websites (Website Builder) |
| support:read | Read support tickets |
| support:write | Open and reply to support tickets |
| cloud:read | Read cloud storage and file list (no contents) |
| mail:read | Read Business Mail domains, mailboxes and aliases |
| cdn:read | Read CDN zones and statistics |
| cdn:write | Clear CDN cache |
| deploy:read | Read deploy projects and deployments |
| deploy:write | Start deployments |
| shop:read | Read shops, products and orders (incl. buyer data) |
| shop:write | Mark orders as shipped |
| domains:write | Change domain settings (automatic renewal) |
| hosting:write | Start web hosting backups |
| servers:read | Read cloud and dedicated servers (without login details) |
| ssl:read | Read purchased SSL certificates (without private key) |
| databases:read | Read managed databases (without passwords) |
| notifications:read | Read notifications |
| notifications:write | Mark notifications as read |
Endpoints
GET/meOwn customer account and permissions of the tokenaccount:read
No parameters.
GET/domainsAll domainsdomains:read
limit– 1–100 (default 50)page– Page (from 1)
GET/domains/{name}A domain (name in ASCII or Unicode)domains:read
No parameters.
PATCH/domains/{name}Switch automatic renewal on or offdomains:write
autoRenew– true | false
curl -X PATCH https://hoster.gg/api/v1/domains/beispiel.de \
-H "Authorization: Bearer hgg_…" -H "Content-Type: application/json" -d '{"autoRenew":false}'GET/domains/{name}/dnsDNS records of a domaindomains:read
No parameters.
POST/domains/{name}/dnsCreate DNS recorddns:write
type– A | AAAA | CNAME | MX | TXT | NS | SRV | CAAname– relative to the zone, “@” = the domain itselfcontent– Value, e.g. IP addressttl– 60–86400 seconds (default 3600)priority– MX/SRV only
curl -X POST https://hoster.gg/api/v1/domains/beispiel.de/dns \
-H "Authorization: Bearer hgg_…" -H "Content-Type: application/json" \
-d '{"type":"A","name":"www","content":"203.0.113.10","ttl":3600}'PATCH/domains/{name}/dns/{id}Change DNS record (only fields provided)dns:write
type– optionalname– optionalcontent– optionalttl– optionalpriority– optional, null = remove
DELETE/domains/{name}/dns/{id}Delete DNS recorddns:write
No parameters.
GET/hostingWeb hosting planshosting:read
No parameters.
GET/hosting/{id}A web hosting planhosting:read
No parameters.
GET/hosting/{id}/domainsDomains of a web space (folder, redirect, PHP version)hosting:read
No parameters.
GET/hosting/{id}/databasesDatabases of a web space (without passwords)hosting:read
No parameters.
GET/hosting/{id}/appsInstalled apps (WordPress, Joomla …) with version and number of known vulnerabilitieshosting:read
No parameters.
GET/hosting/{id}/backupsBackups of a web spacehosting:read
No parameters.
POST/hosting/{id}/backupsStart a manual backup (plan with backups, max. 3 in 24 h) – response 202hosting:write
curl -X POST https://hoster.gg/api/v1/hosting/<id>/backups -H "Authorization: Bearer hgg_…"
GET/invoicesInvoices and credit notesbilling:read
status– UNPAID | PENDING | PAID | FAILED | REFUNDED | CANCELLEDlimit– 1–100page– from 1
GET/invoices/{id}Invoice with itemsbilling:read
No parameters.
GET/invoices/{id}/pdfInvoice as PDF (application/pdf)billing:read
No parameters.
GET/subscriptionsContracts with term and renewalbilling:read
No parameters.
GET/subscriptions/{id}One contract with add-onsbilling:read
No parameters.
GET/websitesWebsites from the Website Builderwebsites:read
No parameters.
GET/websites/{id}Website with custom domains and key figures for the last 30 dayswebsites:read
No parameters.
GET/ticketsSupport ticketssupport:read
No parameters.
POST/ticketsOpen a ticketsupport:write
subject– 3–150 characterscategory– GENERAL | BILLING | DOMAIN | HOSTING | WEBSITE_BUILDER | TECHNICAL | ABUSEpriority– LOW | NORMAL | HIGHmessage– 10–20,000 characters
GET/tickets/{id}Ticket with messagessupport:read
No parameters.
POST/tickets/{id}/messagesReply to a ticketsupport:write
message– 10–20,000 characters
GET/cloudCloud storage: quota and usage (bytes)cloud:read
No parameters.
GET/cloud/filesFiles and folders (without recycle bin, no contents)cloud:read
parent– Folder ID (empty = top level)limit– 1–100page– from 1
GET/mail/domainsBusiness Mail domains with number of mailboxes/aliasesmail:read
No parameters.
GET/mail/domains/{id}Mail domain with mailboxes, aliases and DNS status (no passwords)mail:read
No parameters.
GET/cdn/zonesCDN zones with hostnames and settingscdn:read
No parameters.
GET/cdn/zones/{id}CDN zone with daily valuescdn:read
days– 7 or 30 (default 30)
POST/cdn/zones/{id}/purgeClear cache (whole zone or individual addresses)cdn:write
urls– optional, max. 100 addresses of the zone – without: whole zone
curl -X POST https://hoster.gg/api/v1/cdn/zones/<id>/purge \
-H "Authorization: Bearer hgg_…" -H "Content-Type: application/json" \
-d '{"urls":["https://www.beispiel.de/style.css"]}'GET/deploy/projectsDeploy projects (environment variables are never returned)deploy:read
No parameters.
GET/deploy/projects/{id}Project with the last 20 deploymentsdeploy:read
No parameters.
POST/deploy/projects/{id}/deploymentsStart a production deployment from the current production branchdeploy:write
curl -X POST https://hoster.gg/api/v1/deploy/projects/<id>/deployments \ -H "Authorization: Bearer hgg_…"
GET/deploy/deployments/{id}Status of a deploymentdeploy:read
No parameters.
GET/shopsOwn shopsshop:read
No parameters.
GET/shops/{id}/productsProducts of a shopshop:read
limit– 1–100page– from 1
GET/shops/{id}/ordersOrders of a shop (newest first, incl. buyer data)shop:read
status– PENDING | PAID | SHIPPED | REFUNDED | CANCELEDlimit– 1–100page– from 1
GET/shop-orders/{id}An order with itemsshop:read
No parameters.
POST/shop-orders/{id}/shipMark order as shippedshop:write
carrier– optional, e.g. DHLtrackingNumber– optionalnotify– Shipping email to the buyer (default true)
GET/serversCloud servers and dedicated servers (without login details)servers:read
No parameters.
GET/servers/{id}One serverservers:read
No parameters.
GET/sslPurchased SSL certificates (without private key)ssl:read
No parameters.
GET/databasesManaged databases (without passwords)databases:read
No parameters.
GET/notificationsNotifications, newest firstnotifications:read
unread– 1 = unread onlylimit– 1–100page– from 1
POST/notifications/readMark as readnotifications:write
ids– optional, max. 100 IDs – without: all unread
Command line: hgg
Download hgg.mjs – a single file without dependencies, requires Node.js 20 or newer. It asks for the token hgg login (it does not end up in your shell history) and stores it readable only by you under ~/.config/hgg/config.json.
node hgg.mjs login node hgg.mjs domains node hgg.mjs dns beispiel.de node hgg.mjs dns add beispiel.de TXT @ "v=spf1 -all" --ttl 3600 node hgg.mjs dns rm beispiel.de <eintrag-id> node hgg.mjs invoices --open --json
In scripts, instead of login the environment variable HGG_TOKEN . Every command needs the matching token permission.
Webhooks
Under API → Webhooks you can add up to five https addresses. We send every event from your notification centre (e.g. invoice.created, domain.registered, hosting.ready) as POST – optionally only certain areas. If your address does not respond with 2xx, we retry up to seven times (after 1 min. up to 24 hrs.); after 20 failures in a row we pause the webhook.
POST /dein/pfad
X-Hoster-Event: invoice.created
X-Hoster-Delivery: <ID>
X-Hoster-Signature: t=1760262000,v1=<HMAC-SHA256>
{ "id": "…", "event": "invoice.created", "category": "billing", "createdAt": "…",
"data": { "title": "…", "body": "…", "link": "https://hoster.gg/portal/…" } }Verify the signature (Node.js):
const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
const ok = crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected)) && Math.abs(Date.now() / 1000 - Number(t)) < 300;Error codes
| 400 | invalid_json | Body is not valid JSON |
| 401 | unauthorized | Token missing, invalid, expired or revoked |
| 403 | forbidden | The token lacks the necessary permission |
| 404 | not_found | Does not exist or does not belong to your account |
| 409 | conflict / domain_locked / ticket_closed | Conflicts with existing data or the status |
| 415 | unsupported_media_type | Content-Type: application/json missing |
| 422 | validation_failed | Invalid input – details in the “details” field |
| 429 | rate_limited | More than 120 requests per minute – observe the Retry-After header |

