Add a comment or a reply
POST
/api/models/{id}/comments
const url = 'https://forge.example.com/api/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/comments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":"example","parentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://forge.example.com/api/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/comments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "parentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Comments are kept as written. parentId makes it a reply to a comment of the same model; a reply to a reply joins the same thread. People @mentioned, and the people of a role @mentioned (@[Central team](role:central)), are told on the live channel; only people who can see the model can be mentioned or reached. The author of the comment answered is told too.
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
body
required
string
parentId
null | string format: uuid
Example generated
{ "body": "example", "parentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
id
required
string format: uuid
parentId
required
null | string format: uuid
author
required
object
id
required
string format: uuid
displayName
required
string
body
required
string
mentions
required
Array<object>
object
id
required
string format: uuid
displayName
required
string
roleMentions
required
Array<object>
object
role
required
string
label
required
string
createdAt
required
string format: date-time
keyVersion
null | integer | string format: int32
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "author": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "displayName": "example" }, "body": "example", "mentions": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "displayName": "example" } ], "roleMentions": [ { "role": "example", "label": "example" } ], "createdAt": "2026-04-15T12:00:00Z", "keyVersion": 1}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"}