Context

Restore a context document revision

Restores the document to the given revision by creating a new forward revision whose title and content match that snapshot. Prior revisions are retained. Unknown slugs or uncaptured revisions respond 404; a concurrent write responds 409 revision_conflict.

post/api/v1/context/{slug}/revisions/{revision}/restore

Request

  • Base URL
    https://app.khotan.com
  • URL
    https://app.khotan.com/api/v1/context/{slug}/revisions/{revision}/restore
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

slugstring required
revisioninteger required

Response

The document at its new, restored revision.

slugstring required
titlestring required
descriptionstring nullable required

One-line purpose statement for selection without fetching.

kind'instructions' | 'knowledge' | 'record' required
tagsstring[] required
revisioninteger required
contentSizeinteger required

Raw markdown size in bytes.

folderIdstring nullable required

Folder placement; null at the organization root.

pathstring nullable required

Human-readable folder path; null at the organization root.

updatedAtstring required
staffOnlyboolean required

Visible only to the operator's team. The organization's own members and keys never see it.

contentstring required

The canonical raw markdown.

propertiesobject required

Structured facts beside the markdown: any JSON object.

createdAtstring required
createdByType'agent' | 'api' | 'user' required
updatedByType'agent' | 'api' | 'user' required

Changes

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