Give the agent the exact target name, the intended content and whether the task includes publishing and DNS changes.
Read before updating
Use sites.list for discovery when the site is not known. For an exact existing site, use its direct readers. sites.get_content returns stored template content when available; a file-based site can have no editable template content.
Keep stable site IDs when moving aliases. After a move, an old name can resolve to a different site.
Prepare the content
Upload template images with media.upload_image before using their returned paths. Use these template IDs:
| Template | ID |
|---|---|
| Profile | links |
| Blog | blog |
| Redirect | redirect |
| Token page | token |
| Domain for sale | sale |
| Tip Jar | tip |
For file publishing, provide relative paths and either text or base64 for each file.
A minimal Profile publication can use:
{
"site": "example.ton",
"template": "links",
"content": {
"name": "Example",
"links": [{ "title": "Website", "url": "https://example.com" }]
}
}These are illustrative values; use a name you own and your intended content. The backend validates the template's actual content schema.
Publish and link
After sites.publish_template or sites.publish_files, retain the release and hosting result. Platform ADNL hosting uses sites.send_link_tx; Storage hosting uses the returned BagID with storage.send_bag_link_tx where linking is needed.
For an additional alias, use sites.list_domains, sites.preflight_domain, the required DNS approval, then sites.attach_domain. Review conflicts and any deletion of a last-name source explicitly.
Report a verified result
Read the active release and the exact DNS record. State separately whether content is published, DNS is pending, or the requested link has been observed. Return useful server-supplied links and identifiers.