Skip to main content
POST
Commit
commit regenerates types, commits and pushes, then builds and snapshots in the background. The returned changedApps report buildStatus: "building". Poll GET /apps/{appId} until the build is success, then publish. Before it commits, commit validates the workspace config and the trigger, schedule, and webhook declarations of the workflows you changed, and returns a 400 if either is invalid. Nothing is committed in that case. It doesn’t type-check, and a build can succeed with type errors, so run check first.
If the workspace has newer commits than your session, commit replays your changes on top and the response includes a note. Re-read files before editing them again. If git can’t commit cleanly (unresolved conflict markers, a rebase in progress, a detached HEAD, commits you made by hand with git commit, or another commit changed the same files), commit returns 409 with the files involved and the commands to run. Fix it with POST /bash, then commit again.

Authorizations

Authorization
string
header
required

Enter your Zite API key. Format: Bearer <api_key>

Path Parameters

sessionId
string
required

The build session ID from Open a session.

Body

application/json
message
string
required

Commit message.

Required string length: 1 - 5000
Example:

"Add ticket list endpoint and UI"

Response

The commit and the apps it changed

commitSha
string | null

Null when there was nothing to commit.

changedApps
object[]

Apps the commit touched. Each starts a background build, so poll GET /apps/{appId} until buildStatus is success.

workspaceId
string
note
string

Present when the workspace had newer commits. Re-read files before editing them.

message
string

Present when there was nothing to commit.