Technitium API reference
The Technitium DNS Server API endpoints DNS Panel calls, plus the shared response envelope and status values.
This page documents the subset of the Technitium DNS Server API that DNS Panel calls.
The real source of truth for the response types is the client in
lib/technitium/client.ts; for the full Technitium API, see the
upstream APIDOCS.
Basics
- Base URL:
TECHNITIUM_URL(defaulthttp://localhost:5380). - Authentication: every call appends
?token=<TECHNITIUM_TOKEN>. The panel uses a single central, non-expiring API token. - Method: all calls are GET; parameters are passed as the query string. Empty or
undefinedparameters are dropped by the client.
Response envelope
Every response is JSON with a status field, modeled in code as TechnitiumResponse<T>:
status | Meaning |
|---|---|
ok | Success; payload under response (or top-level) |
error | Failure; errorMessage, optionally stackTrace |
invalid-token | Token invalid or expired |
2fa-required | 2FA required (login without totp) |
// success
{ "status": "ok", "response": { /* ... */ } }
// error
{ "status": "error", "errorMessage": "..." }User / session
login — /api/user/login
Authenticates and returns a session token. Only used as a fallback when no
TECHNITIUM_TOKEN is set. Parameters: user (required), pass (required), totp
(optional 2FA code); includeInfo is hardcoded to true. Returns
{ token, displayName, username, info }.
getSessionInfo — /api/user/session/get
Returns info about the current session (version, permissions); used to check the token's
reachability. Returns { displayName, username, info: { version?, permissions? } }.
Zones
listZones — /api/zones/list
Lists authoritative zones, filtered by the token's view permission. Optional pageNumber
and zonesPerPage (default 10) enable pagination. Returns
{ pageNumber?, totalPages?, totalZones?, zones: [{ name, type, ... }] }.
getZoneOptions — /api/zones/options/get
Options of a zone, including its assigned catalog. Parameter: zone (required);
includeAvailableCatalogZoneNames is hardcoded to false. Returns
{ catalog?, name, type, disabled? }.
createZone — /api/zones/create
Creates a zone. Parameters: zone (required), type (required — Primary, Secondary,
Forwarder, Stub, SecondaryForwarder, SecondaryCatalog, Catalog), catalog
(optional — only for Primary, Secondary, Stub, Forwarder). Returns { domain }.
enableZone / disableZone — /api/zones/enable · /api/zones/disable
Enables or disables a zone. Parameter: zone (required).
deleteZone — /api/zones/delete
Permanently deletes a zone. Parameter: zone (required).
Catalog zones
listCatalogZones — /api/zones/catalogs/list
Returns the names of all catalog zones (no parameters besides token):
{ catalogZoneNames: string[] }.
Zone permissions (Technitium-side)
These endpoints concern Technitium's internal zone permissions. The panel's own access
control lives in the DB table zone_permissions — see
Authentication & permissions.
getZonePermissions — /api/zones/permissions/get
Parameter: zone (required); includeUsersAndGroups is hardcoded to true. Returns
{ userPermissions: [{ username, canView, canModify, canDelete }], groupPermissions, users?, groups? }.
setZonePermissions — /api/zones/permissions/set
Parameters: zone (required), userPermissions and groupPermissions (required, encoded
in Technitium's pipe format).
Records
For all record calls, zone is the zone and domain is the fully qualified record
name (FQDN). The panel assembles the FQDN from the relative name before sending — see
Managing zones & records.
getZoneRecords — /api/zones/records/get
Parameters: domain (required), zone (required), listZone (required — true = all
records of the zone, false = only below domain). Returns
{ zone: { name, type, disabled? }, records: [{ name, type, ttl, disabled?, rData? }] }.
addRecord — /api/zones/records/add
Adds a record. Always required: domain, zone, type (A, AAAA, CNAME, MX,
TXT, NS, SRV, …), ttl. Type-dependent fields include ipAddress (A/AAAA), cname
(CNAME), exchange + preference (MX), text (TXT), nameServer (NS), and
priority + weight + port + target (SRV).
updateRecord — /api/zones/records/update
Updates a record. Expects domain, zone, type, the current values to identify the
record, plus new* fields with the new values (e.g. newIpAddress).
deleteRecord — /api/zones/records/delete
Deletes a record. Expects domain, zone, type, and the type-dependent value fields
(ipAddress / nameServer / cname / text / …) to identify it uniquely.
Dashboard
getDashboardStats — /api/dashboard/stats/get
Returns Technitium web-console statistics. Optional type (LastHour default, LastDay,
LastWeek, LastMonth, LastYear, Custom) and utc (true default). Returns stats
plus chart and top-list data.
Endpoints used by the panel
| Client function | Endpoint |
|---|---|
login | /api/user/login |
getSessionInfo | /api/user/session/get |
listZones | /api/zones/list |
getZoneOptions | /api/zones/options/get |
createZone | /api/zones/create |
enableZone | /api/zones/enable |
disableZone | /api/zones/disable |
deleteZone | /api/zones/delete |
listCatalogZones | /api/zones/catalogs/list |
getZonePermissions | /api/zones/permissions/get |
setZonePermissions | /api/zones/permissions/set |
getZoneRecords | /api/zones/records/get |
addRecord | /api/zones/records/add |
updateRecord | /api/zones/records/update |
deleteRecord | /api/zones/records/delete |
getDashboardStats | /api/dashboard/stats/get |