Skip to main content
POST
Edit a policy document.

Authorizations

klef.session
string
cookie
required

Cookie-based session. Obtain by completing the /auth/login/{provider} OAuth flow; the /auth/callback response sets the klef.session cookie that subsequent requests send automatically.

Body

application/json

Changes address the document through the paths its edit map keys.

source
string
required
Minimum string length: 1
changes
object[]
required

One change an editor makes to a document by what it means rather than by its text. Paths are the ones PolicyEdits keys, so the change lands in the author's text in place.

policyId
null | string<uuid>

Response

OK

The envelope for a single-resource response: T? ApiResponse<T>.Result on success, otherwise null with one or more IReadOnlyList<ApiError> ApiResponse<T>.Errors.

result
null | object
required

The edited document, and what it compiles to.

errors
object[]
required