Skip to content
Hoster.ggHoster.gg

Developers

REST-API

Automate domains, DNS, invoices, tickets, CDN, deployments and shop orders. OpenAPI file for Postman & co.

Quick start

  1. In the customer portal under API create a token with the required permissions.
  2. Send the token as a header: Authorization: Bearer hgg_…
  3. 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:readRead account and customer data
domains:readRead domains and DNS records
dns:writeCreate, change and delete DNS records
hosting:readRead web hosting plans
billing:readRead invoices and contracts
websites:readRead websites (Website Builder)
support:readRead support tickets
support:writeOpen and reply to support tickets
cloud:readRead cloud storage and file list (no contents)
mail:readRead Business Mail domains, mailboxes and aliases
cdn:readRead CDN zones and statistics
cdn:writeClear CDN cache
deploy:readRead deploy projects and deployments
deploy:writeStart deployments
shop:readRead shops, products and orders (incl. buyer data)
shop:writeMark orders as shipped
domains:writeChange domain settings (automatic renewal)
hosting:writeStart web hosting backups
servers:readRead cloud and dedicated servers (without login details)
ssl:readRead purchased SSL certificates (without private key)
databases:readRead managed databases (without passwords)
notifications:readRead notifications
notifications:writeMark notifications as read

Endpoints

GET/meOwn customer account and permissions of the tokenaccount:read

No parameters.

GET/domainsAll domainsdomains:read
Query parameters
  • 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
JSON body
  • 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
JSON body
  • type – A | AAAA | CNAME | MX | TXT | NS | SRV | CAA
  • name – relative to the zone, “@” = the domain itself
  • content – Value, e.g. IP address
  • ttl – 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
JSON body
  • type – optional
  • name – optional
  • content – optional
  • ttl – optional
  • priority – 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
Query parameters
  • status – UNPAID | PENDING | PAID | FAILED | REFUNDED | CANCELLED
  • limit – 1–100
  • page – 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
JSON body
  • subject – 3–150 characters
  • category – GENERAL | BILLING | DOMAIN | HOSTING | WEBSITE_BUILDER | TECHNICAL | ABUSE
  • priority – LOW | NORMAL | HIGH
  • message – 10–20,000 characters
GET/tickets/{id}Ticket with messagessupport:read

No parameters.

POST/tickets/{id}/messagesReply to a ticketsupport:write
JSON body
  • 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
Query parameters
  • parent – Folder ID (empty = top level)
  • limit – 1–100
  • page – 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
Query parameters
  • days – 7 or 30 (default 30)
POST/cdn/zones/{id}/purgeClear cache (whole zone or individual addresses)cdn:write
JSON body
  • 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
Query parameters
  • limit – 1–100
  • page – from 1
GET/shops/{id}/ordersOrders of a shop (newest first, incl. buyer data)shop:read
Query parameters
  • status – PENDING | PAID | SHIPPED | REFUNDED | CANCELED
  • limit – 1–100
  • page – from 1
GET/shop-orders/{id}An order with itemsshop:read

No parameters.

POST/shop-orders/{id}/shipMark order as shippedshop:write
JSON body
  • carrier – optional, e.g. DHL
  • trackingNumber – optional
  • notify – 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
Query parameters
  • unread – 1 = unread only
  • limit – 1–100
  • page – from 1
POST/notifications/readMark as readnotifications:write
JSON body
  • 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

400invalid_jsonBody is not valid JSON
401unauthorizedToken missing, invalid, expired or revoked
403forbiddenThe token lacks the necessary permission
404not_foundDoes not exist or does not belong to your account
409conflict / domain_locked / ticket_closedConflicts with existing data or the status
415unsupported_media_typeContent-Type: application/json missing
422validation_failedInvalid input – details in the “details” field
429rate_limitedMore than 120 requests per minute – observe the Retry-After header