Skip to content

Change the model's context for the next draft

PUT
/api/models/{id}/context
curl --request PUT \
--url https://forge.example.com/api/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/context \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "text": "example", "version": 1 }'

Send text and the version you read; empty text removes it. Answers 409 with currentVersion when someone changed it since. For people who may add a revision.

id
required
string format: uuid
Media typeapplication/json
object
text
required
null | string
version
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Example generated

{
"text": "example",
"version": 1
}

OK

Media typeapplication/json
object
text
required
string
version
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
writtenBy
required
null | string
updatedBy
required
One of:
null
updatedAt
required
null | string format: date-time
aiMaySee
required
boolean
canChange
required
boolean

Example generated

{
"text": "example",
"version": 1,
"writtenBy": "example",
"updatedBy": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"displayName": "example"
},
"updatedAt": "2026-04-15T12:00:00Z",
"aiMaySee": true,
"canChange": true
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}