Create a version comment
Opens a comment thread on a version. Leave out target to comment on the whole page; mentions notifies the people you name.
/v1/spaces/{spaceId}/versions/{versionId}/commentsAuthorizationBearer token · headerrequiredBetter Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.
spaceIdstringrequiredversionIdstringrequiredapplication/jsonpagePathstringPage the thread is anchored to. Ignored when target is a file anchor: that anchor's file.path is the page path, so the thread is always filed under the file it is about.
bodystringrequiredtargetobject | nullWhere in the page or file this thread points. Omit it for a comment on the whole page: the API stores a page anchor. A file anchor files the thread under its file.path; any other shape is stored and returned as sent.
Show propertiesHide properties
objectnullmentionsstring[]Spacefast user ids to @mention. Each must be on the Space's team and able to open it; GET /v1/spaces/{spaceId}/comments/mentionable lists who qualifies. Mentioned people are notified.
idempotencyKeystringResponse for status 201
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
dataobjectrequiredShow propertiesHide properties
idstringrequiredcastThreadIdstringrequiredspaceIdstringrequiredversionIdstring | nullrequiredchannelstring | nullrequiredpagePathstringrequiredurlstring | nullrequiredstatusstringrequiredopen, or archived for a resolved thread.
openarchivedmoderationStatestringrequiredclearspamheldCommentIdsstring[]requiredunreadbooleanrequiredWhether an open thread has a message by someone else since you last read it. Resolved threads are never unread.
unreadCountintegerrequiredMessages by others since you last read the thread. Zero exactly when unread is false.
bodystring | nullrequiredauthorobject | nullrequiredShow propertiesHide properties
kindstring | nullrequiredidstring | nullrequiredprofileIdstring | nullrequirednamestring | nullrequiredusernamestring | nullrequiredShow propertiesHide properties
stringnullavatarUrlstring<uri> | nullrequiredShow propertiesHide properties
string<uri>nullcolorstring | nullrequiredShow propertiesHide properties
stringnullnulltargetobjectrequiredmentionsstring[]requiredSpacefast user ids this thread or reply @mentions.
reactionsobjectrequiredattachmentOriginstring<uri> | nullrequiredShow propertiesHide properties
string<uri>nullattachmentsobject[]requiredShow propertiesHide properties
objectidstringrequirednamestringrequiredcontentTypestringrequiredsizeintegerrequiredkindstringrequiredscreenshotimagefilecropobjectShow propertiesHide properties
xnumberrequiredynumberrequiredwidthnumberrequiredheightnumberrequiredurlstring | nullrequiredcommentsobject[]requiredShow propertiesHide properties
objectattachmentsobject[]requiredShow propertiesHide properties
objectidstringrequirednamestringrequiredcontentTypestringrequiredsizeintegerrequiredkindstringrequiredscreenshotimagefilecropobjectShow propertiesHide properties
xnumberrequiredynumberrequiredwidthnumberrequiredheightnumberrequiredurlstring | nullrequiredmentionsstring[]requiredSpacefast user ids this thread or reply @mentions.
permalinkstring | nullrequireddashboardUrlstring<uri> | nullrequiredThe thread in the dashboard, opened with the reader's own sign-in. Null without a team.
Show propertiesHide properties
string<uri>nullcreatedAtstring<date-time>requiredWhen the thread started. Never changes.
lastActivityAtstring<date-time>requiredWhen the latest message was posted. Resolving, reopening and reactions don't move it.
updatedAtstring<date-time> | nullrequiredWhen anything on the thread last changed. Lists are ordered by it.
Show propertiesHide properties
string<date-time>nullProblem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
typestringrequiredProblem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.
titlestringrequiredShort human-readable summary of the problem type. The server derives it mechanically from code.
statusintegerrequiredHTTP status code of this response, repeated in the body.
detailstringrequiredHuman-readable failure explanation for this occurrence.
codestringrequiredStable snake_case error code naming the failed public contract.
pointerstringRFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.
detailsobjectMachine-readable context for the error code.
fixstringOne sentence on what to do about this error code, the same text as the type page. Read it before retrying.
suggestionsstring[]Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.
nextstring[]Copy-pasteable commands or API requests an agent can run next.
requestIdstringrequiredThe request id to quote when contacting support.