Skip to content

Comment on a work item

POST
/models/{modelId}/work-items/{number}/comments
curl --request POST \
--url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/work-items/1/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "body": "example" }'

Adds a Markdown comment to the item’s timeline.

modelId
required
string format: uuid
number
required
integer format: int64
>= 1

The item’s number in the model’s organization.

Media typeapplication/json
object
body
required

Markdown.

string
>= 1 characters <= 20000 characters

Example generated

{
"body": "example"
}

Created

Media typeapplication/json

One row of an item’s timeline.

object
id
required
string format: uuid
itemId
required
string format: uuid
kind
required

FINDING_GONE and FINDING_REAPPEARED are written by the system on finding items: a check no longer found the finding and closed the item, or found it again and reopened a completed item. Their change names the head commit the check ran at.

string
Allowed values: COMMENT CREATED STATE CLAIMED CLOSED REOPENED ASSIGNEE PRIORITY DUE TITLE DESCRIPTION PARENT RELATION_ADDED RELATION_REMOVED TARGET_GONE TARGET_BACK REANCHORED KEPT_AS_IS LABELS FINDING_GONE FINDING_REAPPEARED
actor
required
object
id
required
string format: uuid
type
required

USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.

string
Allowed values: USER ORGANIZATION SYSTEM MACHINE
name

The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.

string
at
required
string format: date-time
body

A comment’s Markdown; absent once it is deleted.

string
editedAt
string format: date-time
deleted
boolean
change

What a system row records, keyed per kind.

object
key
additional properties
any

Example

{
"kind": "COMMENT",
"actor": {
"type": "USER"
}
}

The caller is a member of the organization without a seat (on the model’s metamodel, for a model’s routes), or is a service account, which no work item route admits.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

The model is not there for the caller: it does not exist, belongs to another organization, is another member’s individual model, or its organization does not have work items. Also the answer for an item number the caller may not see.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}