Skip to content

Put Editor Context

PUT
/api/divinity/editor-context

Record the user’s current editing focus for a project.

EditorContextPayload

Request + response shape for editor-context state.

The M10 utility scorer reads scene_id / chapter_id / document_id to decide the proximity factor for each finding; cursor_offset supports span-level proximity once the scorer grows that granularity. All non-project fields are optional so the frontend can emit partial updates (e.g., a new scene selected but no cursor yet).

object
projectId
required
Projectid
string
documentId
Any of:
string
chapterId
Any of:
string
sceneId
Any of:
string
cursorOffset
Any of:
integer
lastEditAt
Any of:
string
metadata
Metadata
object
key
additional properties
string

Successful Response

EditorContextRecord

Response shape — includes server-stamped updated_at.

Inherits every field from :class:EditorContextPayload and adds the timestamp the server assigned on PUT. Separate class so the POST body can omit updated_at without Pydantic rejecting the payload.

object
projectId
required
Projectid
string
documentId
Any of:
string
chapterId
Any of:
string
sceneId
Any of:
string
cursorOffset
Any of:
integer
lastEditAt
Any of:
string
metadata
Metadata
object
key
additional properties
string
updatedAt
required
Updatedat
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object