Skip to main content
POST
Save an app’s source

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Body

application/json
appId
string
required

The app whose source to change.

Maximum string length: 63
Pattern: ^app-[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
branch
string
required

Branch to commit to: main, or a development branch, which is created when it does not exist.

Required string length: 1 - 255
baseSha
string
required

Commit your edits are based on: the sourceSha of the download you edited. The branch must still point at it, or not exist yet.

Pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$
archiveSha256
string
required

Lowercase hex SHA-256 of the gzip tar of the app folder’s complete new contents.

Pattern: ^[0-9a-f]{64}$
archiveSizeBytes
integer
required

Exact size of the archive in bytes, at most 32 MiB (64 MiB unpacked).

Required range: 1 <= x <= 33554432
message
string

Commit message; Save progress when omitted.

Required string length: 1 - 500

Response

The commit that holds this source, or where to upload the archive before repeating the request.

sourceSha
string | null
required

The branch’s commit holding this source; build and deploy it. Null until the archive is uploaded.

Pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$
upload
object | null
required

Where to PUT the archive before repeating this request; null once committed.