The account endpoint shows what your plan allows and how much of it you've used, so a script or AI agent can stay within its limits rather than discovering them by hitting a plan_limit_reached, feature_not_in_plan, or 429 error.
To compare plans, see Features for each plan's limits and features, and Rate Limits for each plan's API budgets.
Endpoints
| Request | Required access | What it does |
|---|---|---|
GET /api |
Read | Gets the account's email address, plan, limits, features, and API budgets. |
Reading the Account
Reading the account needs your API key in $DNSCHECK_API_KEY:
curl https://www.dnscheck.co/api/v2/account \
-H "Authorization: Bearer $DNSCHECK_API_KEY"
The response is the account, with a 200 status. This one is an Enterprise account monitoring 487 DNS records, about half of its limit, that has made 348 writes today:
{
"object": "account",
"email": "[email protected]",
"plan": "Enterprise",
"subscription_status": "active",
"dns_records": {
"limit": 1000,
"count": 487
},
"features": {
"custom_name_servers": true,
"check_frequencies": [
0,
300,
3600
],
"invert": true,
"load_balancer": true,
"webhooks": true
},
"rate_limits": [
{
"name": "requests",
"limit": 1100,
"remaining": 1099,
"reset": "2026-10-23T14:06:00Z",
"window": 60
},
{
"name": "writes",
"limit": 1000,
"remaining": 1000,
"reset": "2026-10-23T14:06:00Z",
"window": 60
},
{
"name": "writes-daily",
"limit": 10000,
"remaining": 9652,
"reset": "2026-10-24T00:00:00Z",
"window": 86400
},
{
"name": "checks",
"limit": 100,
"remaining": 100,
"reset": "2026-10-23T14:06:00Z",
"window": 60
}
]
}
Fields
| Field | Type | Description |
|---|---|---|
object |
string | Always account. |
email |
string | The account's email address, to confirm which account the API key belongs to. |
plan |
string | The plan's name, such as Basic, Professional, Enterprise, or Enterprise x2. |
subscription_status |
string or null |
|
dns_records |
object | limit is the maximum number of DNS records the plan allows, and count is how many the account has across all of its record groups. |
features.custom_name_servers |
boolean | Whether a record group's name_servers can be set. |
features.check_frequencies |
array of integers | The check_frequency values a record group can be given, in seconds, where 0 pauses its checks. A plan without custom check frequencies lists only the default, 300. |
features.invert |
boolean | Whether a DNS record's invert can be true. |
features.load_balancer |
boolean | Whether a DNS record's load_balancer can be true. |
features.webhooks |
boolean | Whether the account can send webhooks, which are set up in the web interface. |
rate_limits |
array of objects | The account's API budgets, one entry per budget, each matching the budget of the same name in the RateLimit-Policy and RateLimit headers. |
rate_limits[].name |
string | The budget's name: requests for requests of any kind, writes for writes (see What Counts as a Write), writes-daily for writes per UTC day, or checks for on-demand checks. |
rate_limits[].limit |
integer | How many the budget allows per window. |
rate_limits[].remaining |
integer | How many are left in the current window. The requests entry counts this request. |
rate_limits[].reset |
string | When the current window ends and remaining goes back to limit, in UTC. |
rate_limits[].window |
integer | The window's length in seconds, such as 60, or 86400 for writes-daily. |
Checking the Room Left
The examples below print how many more DNS records the account can add. That's dns_records.limit minus dns_records.count, but never less than 0, since count can be more than limit, such as on an expired account, whose limit is 0:
This uses jq, and prints the error instead if the request fails:
curl -sS https://www.dnscheck.co/api/v2/account \
-H "Authorization: Bearer $DNSCHECK_API_KEY" \
| jq '.dns_records // error(.detail) | [.limit - .count, 0] | max'
This uses the requests library (pip install requests):
import os
import requests
response = requests.get(
"https://www.dnscheck.co/api/v2/account",
headers={"Authorization": f"Bearer {os.environ['DNSCHECK_API_KEY']}"},
timeout=30,
)
if response.headers.get("Content-Type", "").startswith("application/problem+json"):
problem = response.json()
print(f"{problem['code']}: {problem['detail']}")
raise SystemExit(1)
response.raise_for_status()
dns_records = response.json()["dns_records"]
print(max(dns_records["limit"] - dns_records["count"], 0))
This needs Node.js 18 or later. Save it in a .mjs file, so top-level await works:
const response = await fetch("https://www.dnscheck.co/api/v2/account", {
headers: { Authorization: `Bearer ${process.env.DNSCHECK_API_KEY}` },
signal: AbortSignal.timeout(30000),
});
if (response.headers.get("Content-Type")?.startsWith("application/problem+json")) {
const problem = await response.json();
console.error(`${problem.code}: ${problem.detail}`);
process.exit(1);
}
if (!response.ok) throw new Error(`HTTP ${response.status} ${response.statusText}`);
const { dns_records: dnsRecords } = await response.json();
console.log(Math.max(dnsRecords.limit - dnsRecords.count, 0));
Using only the standard library. Save it as room-left.go and run it with go run room-left.go:
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://www.dnscheck.co/api/v2/account", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("DNSCHECK_API_KEY"))
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
if response.StatusCode >= 400 && !strings.HasPrefix(response.Header.Get("Content-Type"), "application/problem+json") {
log.Fatalf("HTTP %s", response.Status)
}
var account struct {
DNSRecords struct{ Limit, Count int } `json:"dns_records"`
Code, Detail string
}
if err := json.NewDecoder(response.Body).Decode(&account); err != nil {
log.Fatal(err)
}
if response.StatusCode >= 400 {
log.Fatalf("%s: %s", account.Code, account.Detail)
}
fmt.Println(max(account.DNSRecords.Limit-account.DNSRecords.Count, 0))
}
For the Enterprise account above, each prints 513.
Planning Ahead
- Before adding DNS records, compare
dns_records.countwithdns_records.limit. A zone file import stops at the DNS record limit, so the room left is how many it can add. See Checking the Room Left. - Before setting a paid feature, such as
name_servers, acheck_frequency,invert, orload_balancer, checkfeatures, rather than sending the change and handlingfeature_not_in_plan. - Before a batch of writes or on-demand checks, compare its size with the
remainingofwrites-daily,writes, orchecks. If it doesn't fit,resetsays when there's room again. During the batch, each response'sRateLimitheader reports what's left of the budgets it drew on. Rate Limits covers the header and compares the plans' budgets.
The account endpoint counts against the request budget like any other request. A plan rarely changes, so read it once at the start of a run rather than before every request.