SupportHost italian

Introduction

On this page

The SupportHost reseller API lets your own software sell and manage domains: check availability, register, transfer, renew and restore names, then manage their nameservers, contacts, transfer lock and WHOIS privacy. Every operation is paid from your prepaid credit at your reseller price.

It is a JSON REST API for developers who integrate SupportHost domains into a storefront, a control panel or a billing system.

What you can do

  • Catalog — read your net price list and the TLDs you can sell, and check whether a name is available.
  • Domains — register, transfer, renew and restore domains, and read their state.
  • Domain management — nameservers, contacts, EPP code, transfer lock, WHOIS privacy and auto-renew.
  • Account — your charges and your credit balance.

Base URLs

Environment
Base URL
Sandbox
https://sandbox.supporthost.com/api/v1
Production
https://portal.supporthost.com/api/v1

Build and test your integration against the sandbox first: it behaves like production, with test money and a simulated registry (see Sandbox account). Paths are the same on both, so going live only changes the base URL and the token. Sandbox and production accounts and tokens are separate.

Requests and responses are JSON: send Accept: application/json on every call, and Content-Type: application/json when you send a body.

First request in 2 minutes

  1. Create a sandbox account and an API token (Sandbox account).
  2. Save the token in an environment variable: export API_TOKEN="your-token".
  3. Ask for your price list:
curl "https://sandbox.supporthost.com/api/v1/reseller/pricing" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $API_TOKEN"

The answer lists every TLD you can sell with your net price per term. A 401 means the token is missing or wrong; a 403 with not_reseller or credit_disabled means the account is not enabled for the reseller API yet (see Authentication).

Get your price list #

GET /reseller/pricing

Your net prices for every TLD you can sell, in your account’s currency. This is also the list of TLDs available to you: a TLD that is not here cannot be registered or transferred through the API.

For each TLD, register and renew list every term you can buy (years from min_years to max_years) with its price; transfer lists only the minimum term, the one a transfer buys. grace_fee and redemption_fee are added to a renewal in grace and to a restore; null means none is charged. Prices are net of tax.

idn says whether the API accepts a Unicode name on the TLD (a Unicode name on a TLD with idn: false is refused as invalid_domain); it is not a statement about which scripts the registry supports. registrant_countries lists the registrant countries (ISO codes) the TLD accepts: a register or transfer with a registrant elsewhere is refused as invalid_contact before any credit is taken. null means the panel knows no country restriction, not that the registry has none. A transfer always requires auth_code, whatever the TLD.

dnssec says whether DNSSEC can be managed on the TLD’s domains and in which record form (ds or dnskey), so you know before registering. It is a per-TLD capability: the truth for one domain, including whether the zone is signed for you (enable), is the operations of that domain’s DNSSEC state (GET /client/domains/{domain}/dnssec).

Responses

  • 200

    Your price list.

    Response body application/json
    • data object
      2 properties
      • currency string
      • tlds array of object
        13 properties
        • extension string
        • min_years integer
        • max_years integer
        • register array of object
          2 properties
          • years integer
          • price number
        • renew array of object
          2 properties
          • years integer
          • price number
        • transfer array of object
          2 properties
          • years integer
          • price number
        • grace_fee number | null
        • redemption_fee number | null
        • grace_days integer
        • redemption_days integer
        • idn boolean
        • registrant_countries array of string | null
        • dnssec object
          DNSSEC on the TLD’s domains. A per-TLD capability: the truth for one domain (including whether enable is offered, a zone signed for you) is the operations of its DNSSEC state, GET /client/domains/{domain}/dnssec.
          2 properties
          • supported boolean
            true when DNSSEC can be managed through the API on this TLD’s domains.
          • record_type string | null
            The record form the TLD takes: ds (key_tag, algorithm, digest_type, digest) or dnskey (flags, protocol, algorithm, public_key); null when not supported.
            Allowed values ds dnskey
  • 401 unauthenticated ApiError
  • 403 client_token_required token_not_api_enabled token_not_client_scoped client_access_revoked client_cancelled ip_not_allowed ip_whitelist_misconfigured forbidden not_reseller credit_disabled ApiError
  • 404 client_not_found ApiError
  • 429 rate_limited ApiError

cURL

curl 'https://portal.supporthost.com/api/v1/reseller/pricing' \
  -H "Authorization: Bearer $API_TOKEN" \
  -H 'Accept: application/json'

PHP

<?php

$ch = curl_init('https://portal.supporthost.com/api/v1/reseller/pricing');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('API_TOKEN'),
        'Accept: application/json',
    ],
]);

$body   = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    // Error envelope: {"error": {"code": "...", "message": "...", "fields": {...}}}
    echo $status . ' ' . ($body['error']['code'] ?? '') . ': ' . ($body['error']['message'] ?? '') . "\n";
} else {
    print_r($body);
}

Node.js

// Save as a .mjs file (ES module, Node 18+): it uses top-level await.
const response = await fetch('https://portal.supporthost.com/api/v1/reseller/pricing', {
  headers: {
    Authorization: `Bearer ${process.env.API_TOKEN}`,
    Accept: 'application/json',
  },
});

console.log(await response.json());

Response

200

{
  "data": {
    "currency": "EUR",
    "tlds": [
      {
        "extension": ".com",
        "min_years": 1,
        "max_years": 10,
        "register": [
          {
            "years": 1,
            "price": 11.1699999999999999289457264239899814128875732421875
          }
        ],
        "renew": [
          {
            "years": 1,
            "price": 11.1699999999999999289457264239899814128875732421875
          }
        ],
        "transfer": [
          {
            "years": 1,
            "price": 11.1699999999999999289457264239899814128875732421875
          }
        ],
        "grace_fee": null,
        "redemption_fee": 79.900000000000005684341886080801486968994140625,
        "grace_days": 30,
        "redemption_days": 30,
        "idn": true,
        "registrant_countries": null,
        "dnssec": {
          "supported": true,
          "record_type": "ds"
        }
      }
    ]
  }
}

Error responses share one format: see Errors.

View in reference

Next steps