POSTResolve TON DNS name

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/dnsResolve
CU60

Recursively resolve a TON DNS domain into all records, using the same behavior as GET. Replaces the former address, name, category, and ttl parameters with domain, resolver_address, and seqno. Missing records produce an empty entries array.

Request Body
domainstringrequired

Domain to resolve; relative to resolver_address when supplied. Case-insensitive; a trailing dot is accepted.

resolver_addressstring

Account address in raw format (e.g., 0:ca6e321c...) or user-friendly format (e.g., EQDKbjIcfM...). All formats are automatically detected.

seqnointeger (int32)

Masterchain block for root discovery and every resolver call. Defaults to current state.

Responses
okbooleanrequired

Returns true if the request succeeded; otherwise false. See the error field for details.

@typestring (enum)required

TonLib type identifier for DNS resolution results. Always dns.resolved.

entriesobject[]required

Array of DNS records resolved for the domain. Empty if the domain has no records.

@typestring (enum)required

TonLib type identifier for DNS record entries. Always dns.entry.

namestringrequired

Domain name that the record belongs to, such as foundation.ton.

categorystringrequired

A 256-bit hash value. Accepts either hex format (64 characters) or base64 format (44 characters). Used for block hashes, transaction hashes, and cryptographic proofs.

entryoneOfrequired

Data of the DNS record. Its @type identifies the record kind: text, next resolver, smart contract address, ADNL address, storage address, or unknown.

object 1object
@typestring (enum)required

TonLib type identifier for DNS record data of an unrecognized format. Always dns.entryDataUnknown.

bytesstringrequired

Binary data encoded as base64. Used for serialized cells (BoC format), message bodies, and smart contract code/data.

object 2object
@typestring (enum)required

TonLib type identifier for text DNS record data. Always dns.entryDataText.

textstringrequired

Text value stored in the DNS record.

object 3object
@typestring (enum)required

TonLib type identifier for next resolver DNS record data. Always dns.entryDataNextResolver.

resolverobjectrequired

Address of the next resolver smart contract, which resolves the subdomains of this domain.

@typestring (enum)required

TonLib type identifier for account address objects. Refer to the TonLib type reference for a full list.

account_addressstringrequired

The account address in raw format (workchain:hex), e.g. 0:abc123.... Use the pack address endpoint to convert to user-friendly base64 format.

object 4object
@typestring (enum)required

TonLib type identifier for smart contract address DNS record data. Always dns.entryDataSmcAddress.

smc_addressobjectrequired

Smart contract address that the domain points to, such as a wallet address.

@typestring (enum)required

TonLib type identifier for account address objects. Refer to the TonLib type reference for a full list.

account_addressstringrequired

The account address in raw format (workchain:hex), e.g. 0:abc123.... Use the pack address endpoint to convert to user-friendly base64 format.

object 5object
@typestring (enum)required

TonLib type identifier for ADNL address DNS record data. Always dns.entryDataAdnlAddress.

adnl_addressobjectrequired

ADNL address that the domain points to, such as the address of a TON Site.

@typestring (enum)required

TonLib type identifier for ADNL address objects. Always adnlAddress.

adnl_addressstringrequired

ADNL address in its user-friendly text form.

object 6object
@typestring (enum)required

TonLib type identifier for TON Storage address DNS record data. Always dns.entryDataStorageAddress.

bag_idstringrequired

A 256-bit hash in hexadecimal format. Exactly 64 characters (0-9, a-f).

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X POST "https://ton-mainnet.nodit.io/api/v2/dnsResolve" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "foundation.ton"
  }'
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "dns.resolved",
    "entries": [
      {
        "@type": "dns.entry",
        "name": "foundation.ton",
        "category": "SaJfn+76/+ytD80wxQ3JMxz/i1Xs5T3vYoXAnhfm9dc=",
        "entry": {
          "@type": "dns.entryDataStorageAddress",
          "bag_id": "7fea7af2325f0a5b6908939c9d72f92db4c0ca52cca8ce2c48bb2708bf188541"
        }
      },
      {
        "@type": "dns.entry",
        "name": "foundation.ton",
        "category": "6NRAUIc9uoZap8Fwq0zOZNkIOaNNz9bPcdFOAgVEOxs=",
        "entry": {
          "@type": "dns.entryDataSmcAddress",
          "smc_address": {
            "@type": "accountAddress",
            "account_address": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N"
          }
        }
      }
    ]
  },
  "@extra": "1795684378:13:57.387"
}