Source code

Create or update a source file

Creates or replaces one head file. Pages, components, and modules require name; singleton types take only type. Takes the edit lease when no leaseToken is sent and returns changed: false for identical content.

put/websiteSourceCode/files

Request

  • Base URL: https://api.cactal.ai/v1
  • URL: https://api.cactal.ai/v1/websiteSourceCode/files
  • Auth: HTTP bearer

Request body

websiteIdstring required
contentstring required
leaseTokenstring

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

Response

The new head version after the edit.

versioninteger required

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

changedboolean required

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

Changes

No recorded changes to this operation across all 1 revision of this API.