Source uploads
begin_upload — mint a single-use URL and stream a project archive straight to agenthost, instead of passing it inline.
One tool, for the case where inline files are the wrong shape: a project that already exists on
disk, big enough that base64-ing it into a request means reading the whole thing into your context
first. See Sending a large project for the full flow and the archive rules.
begin_upload
Mint a one-time URL to stream a project archive to.
| Parameter | Type | Description |
|---|---|---|
service_id | uuid | The app this ticket may deploy to. Pass it whenever the app exists — the ticket is bound to it and deploy_app refuses any other app. Omit it only when the app does not exist yet; the ticket then works with create_app and cannot overwrite an existing app's source. |
Returns an upload_id, the url to send to, when the ticket expires_at, and the max_bytes it
will accept. Send a gzipped (or plain) tarball of your project root:
tar czf - --exclude=.git --exclude=node_modules --exclude=.env -C ./my-app . \
| curl -sSf --upload-file - "$UPLOAD_URL"Then pass the upload_id to create_app or
deploy_app in place of files.
Requires a shell, and the url is short-lived
Using this tool means running tar and curl (or an equivalent raw HTTP PUT) on the machine
holding the files — if your client cannot run shell commands, stay on inline files. The URL
expires two minutes after minting, because it is a credential and it is now in your context;
send immediately. Once the bytes land you have 15 minutes to deploy them.
One person, one app, one deploy
A ticket deploys only for the user who minted it, only to the app it was minted for, and only once. See what a ticket is bound to.