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

Authorizations

Authorization
string
header
required

A member credential in the Authorization: Bearer header: a member session JWT, a portal JWT whose login is linked to a membership in that company, an opaque member token, or a verified One Auth identity access token. The credential alone identifies the member and company. Member session JWTs, and portal JWTs the server minted read-only, are refused with 403 on every write.

Path Parameters

site_id
string<uuid>
required

Public id of one of the member's sites.

slug
string
required

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 made on the branch's ref.

status
integer
required

HTTP status code (mirrors the response status line).

data
object
required

The commit a source commit made.

meta
object
required

Envelope metadata present on every response.