apiTON
HomeExplorerBlog
HomeExplorerBlog
Contact
  1. v2.SiteProxy
  • api:TON Documentation
  • v2.Nft
    • Username
      POST
    • Number
      POST
    • Domain
      POST
    • Gift
      POST
    • Item
      POST
    • Items
      POST
  • v2.Rate
    • Fiat rate
      POST
    • Crypto rate
      POST
    • Exchanges rate
      POST
    • Jetton prices
      POST
  • v2.Auth
    • Do
      POST
    • List
      POST
    • Import
      POST
    • Backup
      POST
    • Delete
      POST
    • New
      POST
  • v2.Wallet
    • Send TON
      POST
    • Send Jetton
      POST
    • Send Nft
      POST
  • v2.Address
    • Transactions
    • Details
    • Jettons
    • NFTs
    • Wallets
    • Collections
    • Run get-method
    • Address labels
  • v2.NftContract
    • Mint Nft Collection
    • Mint NFT
  • v2.JettonContract
    • Mint
    • Burn
    • Change owner
    • Close Mint
  • v2.Watch
    • Create watch
    • List watches
    • Delete watch
    • Poll events
    • Test watch
  • v2.SiteProxy
    • Site proxy offer
      POST
    • Check website and domain
      POST
    • Create site proxy order
      POST
    • Get site proxy order
      POST
    • Verify site proxy order
      POST
    • Stop site proxy order
      POST
    • List site proxy orders
      POST
  • Schemas
    • Schemas
      • Connect Error
      • google.protobuf.Any
      • NftDomainSite
      • ListValue
      • Message
      • NullValue
      • Struct
      • AddressGetMethod
      • FieldsEntry
      • DetailsResponse
      • AddressGetMethodArg
      • google.protobuf.Timestamp
      • DetailsRequest
      • AddressLabel
      • AddressLabelsRequest
      • google.protobuf.Value
      • AddressRunGetMethodRequest
      • AddressLabelsResponse
      • BlockID
      • AddressRunGetMethodResponse
      • BurnRequest
      • AddressStackEntry
      • BurnResponse
      • TransactionsResponse
      • ChangeAdminRequest
      • SiteProxyCheckRequest
      • ChangeAdminResponse
      • SiteProxyCheckResponse
      • CloseMintRequest
      • SiteProxyCreateRequest
      • CloseMintResponse
      • SiteProxyCreateResponse
      • DetailsAddress
      • SiteProxyGetRequest
      • DetailsRequest
      • SiteProxyGetResponse
      • DetailsResponse
      • SiteProxyListRequest
      • DomainRequest
      • SiteProxyListResponse
      • DomainResponse
      • SiteProxyOfferRequest
      • ItemRequest
      • SiteProxyOfferResponse
      • ItemResponse
      • SiteProxyOrder
      • Jetton
      • SiteProxyOwner
      • JettonDetails
      • SiteProxyPay
      • JettonsRequest
      • SiteProxyPayMessage
      • JettonsResponse
      • SiteProxyProblem
      • Message
      • SiteProxyRecord
      • MintCollectionRequest
      • SiteProxyRouteLimits
      • MintCollectionResponse
      • SiteProxyStopRequest
      • MintNftRequest
      • SiteProxyStopResponse
      • MintNftResponse
      • SiteProxyUsage
      • MintRequest
      • SiteProxyVerifyRequest
      • MintResponse
      • SiteProxyVerifyResponse
      • NftItem
      • SiteProxyWebProof
      • NftsRequest
      • NftsResponse
      • NumberRequest
      • NumberResponse
      • RateCryptoRequest
      • RateCryptoResponse
      • ResultEntry
      • RateExchangesRequest
      • RateExchangesResponse
      • ResultEntry
      • RateFiatRequest
      • RateFiatResponse
      • ResultEntry
      • SendJettonRequest
      • SendJettonResponse
      • SendNftRequest
      • SendNftResponse
      • SendRequest
      • SendResponse
      • TeleAuction
      • TeleAuctionConfig
      • TeleAuctionLastBid
      • TeleSale
      • Transaction
      • TransactionsRequest
      • TransactionsResponse
      • UsernameRequest
      • UsernameResponse
      • Version
      • WalletAuth
      • WalletAuth4
      • WalletDetails
      • WalletNewRequest
      • WalletNewResponse
      • WalletsRequest
      • WalletsResponse
      • AddressCollection
      • AddressCollectionsRequest
      • AddressCollectionsResponse
      • AuthBackupRequest
      • AuthDeleteRequest
      • AuthDeleteResponse
      • AuthDoRequest
      • AuthImportRequest
      • AuthJwtResponse
      • AuthListRequest
      • AuthListResponse
      • AuthNewRequest
      • BlockID
      • BurnRequest
      • BurnResponse
      • ChangeAdminRequest
      • ChangeAdminResponse
      • CloseMintRequest
      • CloseMintResponse
      • DetailsAddress
      • DomainRequest
      • DomainResponse
      • GiftAttribute
      • GiftRequest
      • GiftResponse
      • ItemRequest
      • ItemResponse
      • Jetton
      • JettonDetails
      • JettonsRequest
      • JettonsResponse
      • MintCollectionRequest
      • MintCollectionResponse
      • MintNftRequest
      • MintNftResponse
      • MintRequest
      • MintResponse
      • NftItem
      • NftItemsRequest
      • NftsRequest
      • NftsResponse
      • NumberRequest
      • NumberResponse
      • RateCryptoRequest
      • RateCryptoResponse
      • RateExchangesRequest
      • RateExchangesResponse
      • RateFiatRequest
      • RateFiatResponse
      • RateJettonPricesRequest
      • RateJettonPricesResponse
      • SendJettonRequest
      • SendJettonResponse
      • SendNftRequest
      • SendNftResponse
      • SendRequest
      • SendResponse
      • TeleAuction
      • TeleAuctionConfig
      • TeleAuctionLastBid
      • TeleSale
      • Transaction
      • TransactionsRequest
      • UsernameRequest
      • UsernameResponse
      • Version
      • WalletAuth
      • WalletDetails
      • WalletInfo
      • WalletsRequest
      • WalletsResponse
    • WatchCreateRequest
    • WatchCreateResponse
    • WatchDeleteRequest
    • WatchDeleteResponse
    • WatchEvent
    • WatchLimits
    • WatchListRequest
    • WatchListResponse
    • WatchPollRequest
    • WatchPollResponse
    • WatchSubscription
    • WatchTestRequest
    • WatchTestResponse
    • WatchTx
    • WatchWebhook
  1. v2.SiteProxy

Check website and domain

POST
/v2.SiteProxy/Check
Judges a website and a .ton domain without writing anything: the website's host as it will be served, the domain's owner, expiry and current site record, and every problem that prevents an order. It reads the domain on the chain and resolves the host, but sends your website no request: a firewall in front of it shows only in Verify (upstream_challenge).
FieldTypeNotes
urlstringyour website: https://shop.example.com or shop.example.com; https only, no path, query or port other than 443; up to 2048 characters
domainstringyour .ton domain: shop.ton or shop, one label
curl -X POST https://app.apiton.org/v2.SiteProxy/Check -H 'Content-Type: application/json' \
  -d '{"url":"https://shop.example.com","domain":"shop.ton"}'
eligible is true when problems is empty (absent when false). domain_owner is the wallet that owns the domain's NFT; right after the domain's auction, until the item takes its next message, that is the winner (as Nft/Domain answers it). record is absent when a problem was found before the chain was read. kind: domain (or subdomain, once names under apiton.ton open); empty when domain is not a .ton name that can be ordered (apiton.ton itself, in the live example).
Problems (problems[].code; message is one sentence for the person who asked). New codes may be added: show message for an unknown one.
CodeWhen
bad_urlnot a website address
not_httpshttp:// or another scheme: only https websites are served
credentialsa user name or password in the address
has_patha path, query or # (a start page is root_path of Create)
bad_porta port other than 443
ip_literalan IP address instead of the website's name
bad_hostnot a valid website name
reserved_namea name that is not a public website (.ton, .onion, .local, localhost, …)
own_hostapiton's own names, or a name that resolves to apiton's address
gateway_hosta public .ton web gateway: serving it would loop
denied_hosta website apiton does not serve
private_addressthe host resolves to a private or reserved address
host_not_foundthe host does not resolve
restricted_namea word like wallet, tonkeeper, airdrop, support or an exchange's name in the domain or the host: refused automatically against phishing
bad_domainnot a .ton domain of one label (4–126 letters, digits or -); a name under apiton.ton while those are not open
own_domaina domain apiton serves itself
domain_not_foundthe domain was never minted
domain_expiredthe domain has expired: renew it first
domain_on_salethe domain is on sale: take it off sale first
domain_on_auctionthe domain is on auction
domain_no_ownernobody owns the domain right now
domain_takenanother live order serves the domain
reserved_subdomaina name under apiton.ton that apiton keeps (www, api, docs, wallet, support, …), once those names open
Errors: failed_precondition (400) — url or domain empty or too long · unavailable (503) — the chain read failed (retry), or the service is off.

Request

Body Params application/jsonRequired

Example
{
    "url": "https://example.com",
    "domain": "apiton.ton"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://app.apiton.org/v2.SiteProxy/Check' \
--header 'Content-Type: application/json' \
--data '{
    "url": "https://example.com",
    "domain": "apiton.ton"
}'

Responses

🟢200OK
application/json
Bodyapplication/json

Examples
{
    "host": "example.com",
    "domain": "apiton.ton",
    "problems": [
        {
            "code": "own_domain",
            "message": "this domain is served by apiton itself"
        }
    ]
}
🔴500Server Error
Previous
Site proxy offer
Next
Create site proxy order
Built with