Change the model's context for the next draft
PUT
/api/models/{id}/context
const url = 'https://forge.example.com/api/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/context';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"text":"example","version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
text
required
null | string
version
required
integer | string format: int32
Example generated
{ "text": "example", "version": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
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}default
Section titled “default”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"}