API reference
A read-and-order REST API for resellers and their customers. Everything here is served by the same application that runs the web panels, so a price quoted by the API is the price the checkout would charge and a domain listed by the API is one the panel would show.
This is the versioned API at /api/v1. The marketing site uses a
separate set of unauthenticated JSON endpoints under /api/domain/. Those are not
documented here and carry no compatibility promise.
Overview
Base URL, where https://your-domain.com is the address of the installation:
https://your-domain.com/api/v1
Every endpoint is GET or POST. Requests and responses are JSON;
send Content-Type: application/json on a POST. HTTPS is mandatory
whenever the installation has forced HTTPS enabled, which is the default — a bearer token
sent in clear text is a token handed to anyone on the network path.
The account the request acts for is derived from the API key, never from the request. There is
no user_id, tenant_id or reseller_id parameter anywhere
in this API, and adding one to a request body has no effect.
Authentication
Send the key as a bearer token:
Authorization: Bearer <key_id>.<secret>
The full token is the 24-character key ID, a dot, and a 43-character secret. The IDs use a
32-character alphabet with l and 1 removed, because a key ID gets
read aloud and retyped.
Authentication is bearer rather than a signed request because the secret is stored only as a
password_hash() output. The server cannot recover it, so it cannot recompute an
HMAC over the request. Storing the secret recoverably would mean a database leak hands over
live credentials instead of useless hashes.
Every request is checked in this order, and the first failure ends it: HTTPS, then the token's shape, then the key row, then the owning account, then the IP allowlist, then the rate limit, then the scope.
An unknown key ID, a revoked key and an expired key all return the same
401 with the same message. Telling a caller which of those applies would turn
the endpoint into an oracle for enumerating keys.
Creating a key
Keys are created in the reseller panel at Reseller → API keys. A reseller's plan sets a maximum number of active keys; revoking one frees a slot. Platform staff can see every key and its usage in the admin panel, but keys are always owned by a tenant.
The full token is displayed exactly once, immediately after creation. It is not emailed, not written to a log and not recoverable afterwards. What the panel can show later is the key ID, the label, the scopes, the last four characters of the secret, and the usage counters.
A key carries an optional expiry. An expired key fails with the same 401 as a
revoked one.
Scopes
There are two scopes. A key is created with an explicit list, or with none.
| Scope | Grants |
|---|---|
read |
Every GET endpoint. |
write |
Every POST endpoint — currently POST /orders only. Also
implies read: a key that can spend money can certainly list a portfolio. |
A key created without selecting any scope is read-only. A key whose stored scope list is empty at the database level is also read-only — the empty case is treated as the most restrictive, not the most permissive, because an empty value is what a hand-written row or a bad migration produces.
A missing scope returns 403 with code insufficient_scope. The
message names the scope the route needed.
Rate limits
Two fixed-window counters per key: a per-minute ceiling that stops a runaway loop, and a
per-day ceiling that stops a slow grind which stays just under the minute limit. Both default
to 60 per minute and 10,000 per day. The figures in force for
a given key are returned by GET /me.
Exceeding either returns 429 with code rate_limited and a
Retry-After: 60 header. The header is deliberately coarse: an exact reset instant
would tell a caller how to pace requests to sit just under the ceiling.
Counters are stored in the database, so they hold across every process the host runs. Unlike the web request limiter, this one fails closed: if the counter cannot be read, the request is refused rather than allowed. An API that cannot count is an API with no ceiling.
No X-RateLimit-* headers are sent. Read the allowance from
GET /me.
IP allowlist
A key may carry an allowlist of IPv4 or IPv6 addresses, each either exact
(203.0.113.7) or a CIDR range (203.0.113.0/24). An empty allowlist
means any address.
A request from an address outside the list returns 403 with code
ip_not_allowed. If the stored allowlist cannot be parsed, the request is refused
— a broken allowlist is a misconfiguration, and reading it as "allow everyone" would silently
remove the control.
Conventions
Success envelope
{
"data": …,
"meta": { … }
}
data is an object or an array. meta is present only when there is
something to say — pagination figures, or a per-call note. A successful response is
Cache-Control: no-store.
Error envelope
{
"error": {
"code": "validation_failed",
"message": "Some fields are invalid.",
"fields": { "years": "Years must be between 1 and 10." }
}
}
code is stable and meant to be branched on. message is safe to show
a developer. fields is present only on
validation_failed.
Money
Every amount is a string with four decimal places, for example
"12.5000". Money is never a float anywhere in this API. A client that multiplies a
float by a term will disagree with the server by a cent, and the server is right.
Dates
Timestamps are YYYY-MM-DD HH:MM:SS in UTC, except where a field is explicitly a
date (expiry_date, registration_date), which is
YYYY-MM-DD. Nullable dates are null, never an empty string.
Domain names
Names are normalised to lowercase ASCII before use. A scheme, path, query, fragment or
trailing dot in the input is stripped; an internationalised name is converted to punycode when
the intl extension is available. Anything that is not a valid domain name after
that is rejected with 422.
Errors
| Status | code | Meaning |
|---|---|---|
| 401 | unauthenticated | No token, a malformed token, or a key that is unknown, revoked or expired. |
| 402 | insufficient_funds | The available balance does not cover the order. fields carries balance, required and currency. |
| 403 | https_required | The installation forces HTTPS and the request arrived over HTTP. |
| 403 | account_inactive | The key is valid but the owning account is suspended, closed or pending. |
| 403 | ip_not_allowed | The caller's address is not in the key's allowlist. |
| 403 | insufficient_scope | The key lacks the scope the route requires. |
| 404 | not_found | No such domain or order that this account may see. |
| 409 | account_missing | The account that owns the key was deleted mid-request. |
| 409 | not_available | A registrar said the domain is not available for registration. |
| 422 | validation_failed | A parameter is missing, malformed or out of range. |
| 422 | not_sellable | The extension cannot be sold to this account — no active registrar, no base cost, or no price set for it. |
| 429 | rate_limited | A per-minute or per-day ceiling was reached. |
| 500 | order_failed | The order could not be created. Safe to retry with the same idempotency key. |
| 500 | server_error | An unhandled failure, from the middleware's catch-all. |
| 503 | server_error | Authentication itself is unavailable — the key lookup failed. |
A domain or order that exists but belongs to another tenant returns 404, not
403. Telling a caller "that exists but is not yours" leaks the platform's
portfolio, one probe at a time.
Every request is written to the API access log — success, refusal and exception alike — and is visible in the admin panel. Request bodies are stored with sensitive fields redacted.
Pagination
The collection endpoints — /wallet/transactions, /domains and
/orders — take two query parameters.
| Parameter | Default | Range |
|---|---|---|
page | 1 | 1 or more. A value below 1 is clamped to 1. |
per_page | 25 | 1 to 100. A larger value is clamped to 100. |
The meta block on a paginated response:
{
"meta": {
"page": 1,
"per_page": 25,
"total": 214,
"total_pages": 9
}
}
The ceiling exists because this runs on a shared host: one unbounded query slows every tenant on the account.
Endpoints
Confirms the key works and reports what it can do. Call this first in an integration: it is the fastest way to find out that a key is missing a scope or that the account is on hold, rather than discovering it halfway through a purchase.
Response
{
"data": {
"account": {
"public_id": "AC-7F3K2M",
"uuid": "0e4b8f2a-6c1d-4a37-9f55-2b8e1c0d7a94",
"type": "reseller",
"email": "ops@example.com",
"name": "Alex Morgan",
"company": "Example Hosting",
"country": "US",
"currency": "USD",
"status": "active",
"depth": 0,
"member_since": "2026-01-14 09:12:03"
},
"key": {
"key_id": "k3m9xr2tqv7wbz4hdc8njyf6",
"scopes": ["read", "write"],
"rate_per_minute": 60,
"rate_per_day": 10000
},
"branch": {
"accounts": 42,
"resellers": 4,
"customers": 38,
"domains": 511
},
"wallet": {
"balance": "1250.0000",
"available": "1250.0000",
"currency": "USD",
"status": "active",
"updated_at": "2026-11-20 18:41:02"
}
}
}
branch counts the whole tree beneath the account, at any depth, resolved
through the hierarchy closure table. An account with no descendants reports zeros rather
than omitting the block.
wallet.available is the balance plus the account's credit limit — the same
figure the checkout compares an order against. wallet reports zeros and
status: "active" when no wallet has been opened yet; it does not create one.
The caller's wallet, same shape as the wallet block on /me.
{
"data": {
"balance": "1250.0000",
"available": "1250.0000",
"currency": "USD",
"status": "active",
"updated_at": "2026-11-20 18:41:02"
}
}
Ledger entries for the caller's wallet, newest first. Each row is one leg of a balanced double-entry group; the opposing leg belongs to another wallet and is not returned.
Query parameters
| Name | Type | Notes |
|---|---|---|
category | string | Optional filter. One of deposit, order, refund, transfer_in, transfer_out, adjustment, commission, fee, reversal. Anything else is a 422. |
page | integer | See Pagination. |
per_page | integer | Default 25, maximum 100. |
Response
{
"data": [
{
"id": 91845,
"entry_group": "5d1c8e44-2a9f-4b6e-8c31-7f0a93d2b561",
"direction": "credit",
"amount": "12.5000",
"signed_amount": "-12.5000",
"balance_after": "1250.0000",
"currency": "USD",
"category": "order",
"description": "Registration of example.com for 1 year",
"reference": { "type": "order", "id": 4412 },
"created_at": "2026-11-20 18:41:02"
}
],
"meta": { "page": 1, "per_page": 25, "total": 96, "total_pages": 4 }
}
signed_amount is the authoritative figure and is what the ledger itself sums.
direction and amount are carried for display;
signed_amount already carries the sign, and for a debit is negative.
An account with no wallet gets an empty array and a zero total, not a
404.
The portfolio: the caller's own domains plus every domain belonging to an account beneath them in the hierarchy. A reseller's integration reads its whole branch; a customer's reads only its own. Sorted by name.
Query parameters
| Name | Type | Notes |
|---|---|---|
status | string | One of pending, active, expired, redemption, grace, transferred_out, cancelled, failed, suspended. Anything else is a 422. |
q | string | Substring match on the domain name. Wildcards in the value are escaped, so % searches for a literal per cent sign. |
expiring | integer | Expiring within this many days. Present with any value enables the filter; the value is clamped to 1–365 and defaults to 30. |
page | integer | See Pagination. |
per_page | integer | Default 25, maximum 100. |
Response
{
"data": [
{
"name": "example.com",
"uuid": "7c2f9a10-4d3b-4e88-b1a6-9c5e7f2d0b83",
"status": "active",
"tld": "com",
"registrar": "Namecheap",
"owner": { "public_id": "AC-7F3K2M", "email": "ops@example.com" },
"registration_date": "2025-03-02",
"expiry_date": "2027-03-02",
"auto_renew": true,
"privacy_enabled": true,
"lock_status": "locked",
"nameservers": ["ns1.example.com", "ns2.example.com"],
"dns_management": "external",
"last_synced_at": "2026-11-20 04:00:11"
}
],
"meta": { "page": 1, "per_page": 25, "total": 511, "total_pages": 21 }
}
The authorisation code (EPP code) is deliberately absent. It is encrypted at rest and is a transfer credential; releasing it belongs to a deliberate action with its own authorisation, not a list read.
Availability for one or more names, answered by a live registrar lookup. Up to ten names per call: each miss may be a real request to a provider, and this runs on a shared host with a request timeout measured in seconds.
Query parameters
| Name | Type | Notes |
|---|---|---|
domain | string | A single name. Ignored when domains is present. |
domains | string | Comma-separated names, at most ten. Duplicates and blanks are dropped. |
One of the two is required. Neither present is a 422.
Response
{
"data": [
{
"domain": "example.com",
"status": "taken",
"checked": true,
"available": false,
"premium": false,
"premium_price": null,
"premium_currency": null,
"reason": null
},
{
"domain": "newbrand.io",
"status": "available",
"checked": true,
"available": true,
"premium": false,
"premium_price": null,
"premium_currency": null,
"reason": null
},
{
"domain": "unreachable.net",
"status": "unknown",
"checked": false,
"available": false,
"premium": false,
"premium_price": null,
"premium_currency": null,
"reason": "No registrar returned a result for this domain."
}
],
"meta": { "checked": 2, "total": 3 }
}
Never treat an unchecked name as available.
available is true only when checked is true and a
registrar said so. The platform never shows unverified availability, and neither should
a client built on it. checked: false means no provider answered — the
honest answer to "is it free?" is "nobody said".
status is one of available, taken,
premium, unsupported, unknown or
error. premium means the name is registrable but priced by the
registry, so it is not available at the quoted extension price — which is why
premium_price is reported separately.
Answers are cached for a short period per installation, so a repeat check of the same name may be served without a second registrar call.
One domain, by name. Returns the same object as the row in /domains, without
meta.
GET /api/v1/domains/example.com
A domain belonging to another tenant is a 404, not a 403.
What this account would actually be charged, extension by extension. Prices are resolved through the same hierarchy walk the checkout uses, so a reseller sees the price its own customers pay and a customer sees the price its reseller set.
The platform's cost is never returned. Margin is the reseller's commercial information.
Query parameters
| Name | Type | Notes |
|---|---|---|
operation | string | register, renew, transfer or restore. Default register; an unrecognised value falls back to it rather than erroring. |
years | integer | 1 to 10. Out-of-range values are clamped. |
Response
{
"data": [
{
"tld": "com",
"operation": "register",
"years": 2,
"price": "25.0000",
"total": "25.0000",
"unit_price": "12.5000",
"currency": "USD",
"available": true
},
{
"tld": "net",
"operation": "register",
"available": false,
"price": null,
"currency": "USD",
"reason": "No price is set for this extension."
}
],
"meta": { "operation": "register", "years": 2, "count": 2 }
}
price and total are the price for the whole term.
unit_price is that figure divided by years. With
years=2 above, the order costs 25.0000, not 12.5000.
An extension that cannot be sold is still listed, with available: false and a
reason. Omitting it silently would leave a caller unable to tell "unconfigured" from
"unpriced". When no registrar connection is active at all, data is empty and
meta.note says so.
Orders placed by the caller and by the accounts beneath them, newest first.
Query parameters
| Name | Type | Notes |
|---|---|---|
status | string | One of pending_payment, queued, processing, completed, partially_completed, failed, cancelled, reconciliation. Anything else is a 422. |
page | integer | See Pagination. |
per_page | integer | Default 25, maximum 100. |
Response
{
"data": [
{
"order_number": "ORD-2026-004412",
"status": "completed",
"payment_status": "paid",
"type": "registration",
"total": "12.5000",
"currency": "USD",
"buyer": { "public_id": "AC-7F3K2M", "email": "ops@example.com" },
"domains": ["example.com"],
"failure_reason": null,
"created_at": "2026-11-20 18:40:55",
"completed_at": "2026-11-20 18:41:58"
}
],
"meta": { "page": 1, "per_page": 25, "total": 1, "total_pages": 1 }
}
Line items are omitted from the list and included by GET /orders/{number}.
Cost and margin columns are never returned by either.
Register a domain for the authenticated account. This runs the same five steps as the web checkout, in the same order:
- Re-quote server-side. No price the caller sends is used.
- Re-check availability at the moment of purchase.
- Confirm the wallet covers it.
- Snapshot the price into the order.
- Queue settlement — the registrar is never called inside the request.
Headers
| Name | Required | Notes |
|---|---|---|
Idempotency-Key | No | At most 100 characters. Namespaced per buyer, so two tenants cannot collide on the same value. |
Body
| Name | Type | Notes |
|---|---|---|
domain REQ | string | A valid domain name. Normalised before use. |
years | integer | 1 to 10. Default 1. |
idempotency_key | string | Alternative to the header. The header wins when both are present. |
POST /api/v1/orders
Authorization: Bearer k3m9xr2tqv7wbz4hdc8njyf6.<secret>
Content-Type: application/json
Idempotency-Key: 8f1c2d7e-4a90-4b3c-9e55-1d6a0f2b8c47
{ "domain": "newbrand.io", "years": 1 }
Response — 201 Created
{
"data": {
"order_number": "ORD-2026-004413",
"status": "pending_payment",
"payment_status": "paid",
"type": "registration",
"total": "14.0000",
"currency": "USD",
"buyer": { "public_id": "AC-7F3K2M", "email": "ops@example.com" },
"domains": ["newbrand.io"],
"failure_reason": null,
"created_at": "2026-11-21 02:14:07",
"completed_at": null,
"items": [
{
"domain": "newbrand.io",
"operation": "register",
"years": 1,
"quantity": 1,
"unit_price": "14.0000",
"total_price": "14.0000",
"status": "pending",
"error": null,
"attempts": 0
}
],
"queued": true
}
}
Idempotency
A retried request returns the order that already exists instead of placing a second one —
which, for a purchase, means instead of charging twice. A replay answers
200 (not 201) with meta.idempotent_replay: true,
because 201 would claim something new was created.
Without a header or body key, one is derived from the buyer, the domain and the term. That means a deliberate re-order of the same domain in the same term also returns the original order — which is correct: a domain cannot be registered twice, so a second order for it was never going to succeed. To buy a second domain, send a different domain.
The queued flag
queued reports what is actually in the queue, not what was intended. On a
replay this is the question that matters: the original request's push may have failed, and
claiming otherwise would tell a client to wait for progress that will never happen. When it
is false, the payload also carries a warning — the order exists,
nothing has been charged, and a human has to retry it from the order screen.
A 201 means the order exists and is queued. It does not mean
the domain is registered. Registration happens in the background; poll
GET /orders/{number} and watch status and
items[].status.
Failure modes, all of which leave no order behind: 422 for a malformed name or
an out-of-range term, 422 not_sellable when the extension has no
active registrar or no price, 409 not_available when a registrar
says the name is taken, and 402 insufficient_funds when the
available balance is short — the last carrying balance,
required and currency.
One order by its order number, including line items. This is the endpoint to poll after a
POST.
GET /api/v1/orders/ORD-2026-004413
items[].error carries the provider's own message, which is what distinguishes
"retry this" from "call us". An order belonging to another tenant is a 404.
status: "reconciliation" means the registrar call was attempted and the
outcome is unknown — for example a timeout after the provider accepted the request. Such an
order is never retried automatically, because a retry could register the domain a second
time. It needs a human.
Objects
Domain
| Field | Type | Notes |
|---|---|---|
name | string | Lowercase ASCII. |
uuid | string | Stable identifier; safe to key your own records on. |
status | string | The platform's own lifecycle state, not the provider's vocabulary. |
tld | string|null | Extension, without the dot. |
registrar | string|null | Provider name, when the domain is attached to a connection. |
owner | object | public_id and email of the owning tenant. |
registration_date | string|null | YYYY-MM-DD. |
expiry_date | string|null | YYYY-MM-DD. |
auto_renew | boolean | |
privacy_enabled | boolean | Whether WHOIS privacy is on at the provider. |
lock_status | string | Transfer lock state. |
nameservers | array of string | Empty array when none are set. |
dns_management | string | Where DNS is served. |
last_synced_at | string|null | Last successful reconciliation with the provider. |
Order
| Field | Type | Notes |
|---|---|---|
order_number | string | The identifier for GET /orders/{number}. |
status | string | Lifecycle state of the order. |
payment_status | string | Wallet settlement state. |
type | string | Order category. |
total | string | Four decimals. |
currency | string | ISO code. |
buyer | object | public_id and email. |
domains | array of string | Every domain in the order. |
failure_reason | string|null | Set when the order failed. |
created_at | string | |
completed_at | string|null | |
items | array | Only on GET /orders/{number} and on POST responses. |
Status codes
| Code | Meaning in this API |
|---|---|
200 | Success. Also returned for a replayed POST /orders. |
201 | A new order was created. |
402 | Insufficient funds. |
403 | HTTPS required, account inactive, IP not allowed, or scope missing. |
404 | Not found, or not yours. |
409 | Not available, or the owning account vanished. |
422 | A parameter is invalid, or the extension is not sellable. |
429 | Rate limited. Retry-After: 60. |
500 | Server-side failure. |
503 | Authentication is unavailable. |
Limitations
Stated plainly, so that nobody builds an integration around something that is not there.
| Not available in v1 | Notes |
|---|---|
| Domain lifecycle changes | No renew, transfer, nameserver change, lock change, WHOIS privacy change or delete
endpoint. POST /orders registers a domain and nothing else. Lifecycle
operations are available in the web panels only. |
PUT, PATCH, DELETE |
No method other than GET and POST is routed. There is no
endpoint to update or delete anything. |
| Webhooks / callbacks | The platform has no outbound event delivery. Order progress must be polled with
GET /orders/{number}. |
| Bulk orders | POST /orders takes one domain. The web checkout supports several; the
API does not. |
| Customer and sub-reseller management | No endpoint to create or edit accounts beneath you. That is web-panel only. |
| Deposits and withdrawals | No endpoint moves money into or out of a wallet. The wallet is readable, not fundable. A deposit needs a payment gateway redirect, which is a browser flow. |
| Contact and WHOIS detail updates | Not exposed. |
| Invoice and receipt documents | No PDF or invoice endpoint. |
| Rate-limit headers | No X-RateLimit-* headers. Read the allowance from GET /me. |
| Partial response selection | No field filtering, no fields= parameter, no expand=. |
Behaviour worth knowing
-
Availability is never assumed. A name is only
availablewhen a registrar said so in this or a very recent check. - Claiming a domain is asynchronous. The order is queued and provisioned by the cron worker, not during the request. An installation whose cron is not running will accept orders that never progress — the admin panel warns when that is the case.
-
reconciliationis terminal until a human acts. An order in that state means the provider may or may not have acted. It is never retried automatically. - Historical prices do not move. Prices are snapshotted onto the order when it is created, so changing a price afterwards never rewrites an existing order or invoice.
-
Money is exact. Four decimal places, stored as integers internally. Fees and
margins are never recomputed from a rounded per-year unit price, which is why
totalon an order matches the quote to the cent.
This reference documents version 1 of the DomainStack API. Endpoints, parameters and response shapes here are what the installed application serves; nothing is aspirational.