Upload App Document
document_uploadCreate a short-lived, byte-scoped upload session for an HTML document authored in a native editor or shell. The caller supplies the exact UTF-8 byte length and SHA-256 hex digest as { size, sha256, app_id? }. The returned upload_url accepts a PUT of those raw UTF-8 bytes with Authorization: Bearer <upload_token>; this ticket can upload only the declared bytes and is not an account credential. The returned document_id is used by deploy_app and is mutually exclusive with html and html_path. The ticket expires after 15 minutes. A retry with the same ticket and deploy parameters returns the original deployed result for 24 hours; changed content or deploy parameters need a fresh upload session. If the shell cannot reach the upload URL, inline deployment remains available. The PUT works from any network-capable shell and does not require the Homespun CLI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | UTF-8 byte length of the HTML document. | |
| app_id | No | Existing app id when this upload is for a redeploy; omit for a create. | |
| sha256 | Yes | SHA-256 hex digest of the exact UTF-8 HTML bytes to upload. |