Skip to main content
PUT
Create or update a source file

Authorizations

Authorization
string
header
required

Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.

Body

application/json
websiteId
string
required
Minimum string length: 1
file
object
required
content
string
required
leaseToken
string

Omit to have Cactal take the edit lease for you; pass a token from websiteSourceCode.lease.acquire to take over from another editor.

Minimum string length: 1

Response

The new head version after the edit.

version
integer
required

Head version after the edit: the previous head plus one, or the unchanged head when changed is false.

changed
boolean
required

false when the edit was a no-op and no new version was created.