Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Save file

PUThttps://api.butterix.com/v1/sites/:site/editor/file

Commits a file to the draft branch (one save is one commit). Pass the baseSha from when the file was opened; if someone else has changed it, you get 409 with the latest content to merge. Sites connected to Git can't write to the production branch directly.

Authentication

AuthorizationBearer

An organization API key, created in the console under Organization settings → API Keys, starting with biti_. It acts as editor and can't do anything that requires admin.

biti_sessionstring

The HttpOnly session cookie set on login. Requests that change data must be same-origin (the Origin header is checked) to prevent CSRF.

Path parameters

sitestringRequired

Site slug or id

Request

This endpoint expects an object.
branchstringRequired
pathstringRequired
contentstringRequired<=2000000 characters
messagestringOptional
baseShastringOptional

Response

New sha
shastringOptional

Errors