Check finds eligible, and answers it with its manage_secret — shown once.| Field | Type | Notes |
|---|---|---|
url, domain | string | as in Check |
root_path | string | optional start page: / of the .ton site redirects to this path of your website (/start/); a path other than /, without host, query or #, up to 256 characters |
curl -X POST https://app.apiton.org/v2.SiteProxy/Create -H 'Content-Type: application/json' \
-d '{"url":"https://shop.example.com","domain":"shop.ton"}'
# (illustrative) {"order":{"id":"7k3qx9zd2m","domain":"shop.ton","host":"shop.example.com","status":"draft",…},
# "manage_secret":"pxs_9f2c…"}Create is a new order with its own id, payment comment, web token and secret — asking again for the same pair makes another order; it never answers or changes an existing one. Prove and pay the order you keep; the others are deleted unpaid after a day (draft) or a week (ready_to_pay).manage_secret is shown once, here: apiton keeps only its hash and never issues another one for the order. Keep it — a lost secret cannot be recovered. To stop serving the site without it, point the domain's site record elsewhere (dns.ton.org): the order is then suspended (record_moved) and the site is not served.draft) is deleted to make room; only when all 3 are verified (ready_to_pay) is the answer resource_exhausted. So verify an order soon after creating it. With an API key the order is linked to the key (List).{"code":…,"message":…})| Code | When |
|---|---|
failed_precondition (400) | not eligible: <code>: <message>; … — the problems Check lists; url or domain empty or too long |
invalid_argument (400) | a bad root_path |
resource_exhausted (429) | 3 verified unpaid orders of the website or the domain, or 200 unpaid orders in all; the plan's limits |
unavailable (503) | the chain read failed (retry), or the service is off |