Skip to main content
POST
Commit source to a site's branch

Authorizations

Authorization
string
header
required

A company admin credential for your company, or a droplet installation token with the website scope for reads, except on the share routes, which refuse a droplet token.

Path Parameters

id
string<uuid>
required

The site's id.

slug
string
required

The slug of one of the site's branches.

Required string length: 1 - 40
Pattern: ^[a-z0-9]+(-[a-z0-9]+)*$

Body

application/json

The folder's whole source tree, committed onto the branch's own ref from the head it was made from.

base_commit
string
required

The full sha of the branch ref's head the source was made from. A commit from any other head is refused as stale_source.

Pattern: ^[0-9a-f]{40}$
message
string
required

The commit message.

Required string length: 1 - 1000
files
object
required

Each file of the folder, its path relative to the folder's root (no leading slash, no . or .. segment, nothing under .git) to its content in Base64. A path the base commit holds that is not here is deleted, except dotfiles. The files hold at most 25 MiB decoded.

Response

The commit was made on the branch's ref.

The commit a source commit made on the branch's ref.

source_commit
object
required

The commit.

status
integer
required

The HTTP status.

meta
object
required

Response metadata included on every response body.