Skip to main content

Comments

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: comments · 10 operations

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads​

List a project's comment threads

A page of the project's threads, most recently active first, each with its opening comment and its comment count.

Filters combine: version (revision id or version label) lists one version's threads — on its classes, properties, paths, and operations as well as on the version itself; status keeps open, resolved, or orphaned (threads whose element was deleted, each carrying the element's last-known anchor_label); anchor_type and anchor_id narrow to one kind of element or one element; mentions_me=true keeps threads with a comment mentioning the caller.

Requires projects:view.

Operation id: list_comment_threads_v1_tenants__tenant_slug__projects__project_ref__comment_threads_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
versionquerystring or nullnoRevision id or version label.
statusqueryenum "open", "resolved", "orphaned" or nullnoopen, resolved, or orphaned.
anchor_typequeryenum "class", "property", "path", "operation", "version" or nullnoElement kind.
anchor_idquerystring or nullnoElement id.
mentions_mequerybooleannoOnly threads with a comment mentioning the caller.
limitqueryintegernoPage size.
offsetqueryintegernoThreads to skip.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list a project's comment threads.application/json CommentThreadListResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads​

Open a comment thread on an element

Open a thread on one element of a version — a class, property, path, operation, or the version itself — together with its first comment.

The anchor is the element's stable id, never a canvas position, and the element must exist in the named version. For a version anchor anchor_id may be omitted; if given it must be that version's id.

@name tokens in the Markdown body are resolved server-side against the tenant's members (full email, email local part, or display name without spaces) and stored in the comment's mentions. A handle matching several members resolves to nobody.

Requires projects:view — read access to a project grants commenting. Rate limited per user (shared with replies).

Operation id: open_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for open a comment thread on an element.

Responses

StatusDescriptionBody
201Successful response for open a comment thread on an element.application/json CommentThreadDetail
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}​

Read a comment thread

A thread with all of its comments, oldest first.

Requires projects:view.

Operation id: read_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read a comment thread.application/json CommentThreadDetail
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}​

Delete a comment thread

Delete a thread and every comment in it.

Requires projects:view, and the caller must be the member who opened the thread or a tenant administrator (403 comment-forbidden otherwise).

Operation id: delete_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
204Successful response for delete a comment thread.—
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}/comments​

Reply to a comment thread

Add a Markdown comment to a thread. @name mentions are resolved server-side, as when opening a thread. A resolved thread accepts replies and stays resolved.

Requires projects:view. Rate limited per user (shared with opening threads).

Operation id: reply_to_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__comments_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for reply to a comment thread.

Responses

StatusDescriptionBody
201Successful response for reply to a comment thread.application/json CommentRecord
422Validation Errorapplication/json HTTPValidationError

PATCH /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}/comments/{comment_id}​

Edit a comment

Replace a comment's Markdown. Mentions are re-resolved from the new text and edited_at is stamped.

Requires projects:view, and the caller must be the comment's author or a tenant administrator (403 comment-forbidden otherwise).

Operation id: edit_comment_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__comments__comment_id__patch

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
comment_idpathstringyesPath parameter identifying the comment id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for edit a comment.

Responses

StatusDescriptionBody
200Successful response for edit a comment.application/json CommentRecord
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}/comments/{comment_id}​

Delete a comment

Delete a comment. Deleting a thread's last comment deletes the thread as well, which the response reports as thread_deleted: true.

Requires projects:view, and the caller must be the comment's author or a tenant administrator (403 comment-forbidden otherwise).

Operation id: delete_comment_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__comments__comment_id__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
comment_idpathstringyesPath parameter identifying the comment id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for delete a comment.application/json CommentDeletionResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}/relink​

Relink an orphaned comment thread

Re-attach an orphaned thread — one whose element was deleted — to another element of the thread's own version: a class, property, path, operation, or the version itself (for which anchor_id may be omitted).

The thread keeps every comment. It returns to resolved if it was resolved before its element was deleted, and to open otherwise; anchor_label and orphaned_at are cleared.

The target must exist in the thread's version (404 comment-anchor-not-found). A thread that is still anchored to a live element cannot be relinked (409 comment-thread-not-orphaned).

Requires projects:view — anyone taking part in the discussion may relink it.

Operation id: relink_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__relink_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for relink an orphaned comment thread.

Responses

StatusDescriptionBody
200Successful response for relink an orphaned comment thread.application/json CommentThreadRecord
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}/reopen​

Reopen a comment thread

Reopen a resolved thread, clearing its resolution. Reopening an open thread changes nothing. An orphaned thread must be relinked first (409 comment-thread-orphaned).

Requires projects:view.

Operation id: reopen_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__reopen_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for reopen a comment thread.application/json CommentThreadRecord
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/comment-threads/{thread_id}/resolve​

Resolve a comment thread

Mark a thread resolved, recording who resolved it and when. Resolving a thread that is already resolved changes nothing. An orphaned thread must be relinked first (409 comment-thread-orphaned).

Requires projects:view — anyone taking part in the discussion may resolve it.

Operation id: resolve_comment_thread_v1_tenants__tenant_slug__projects__project_ref__comment_threads__thread_id__resolve_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
thread_idpathstringyesPath parameter identifying the thread id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for resolve a comment thread.application/json CommentThreadRecord
422Validation Errorapplication/json HTTPValidationError

Schemas used​

CommentBody​

A comment's Markdown text, for a reply or an edit.

PropertyTypeRequiredDescription
bodystringyesBody.

CommentDeletionResponse​

The outcome of deleting a comment.

PropertyTypeRequiredDescription
deletedbooleanyesAlways true; a comment that is not there is a 404.
thread_deletedbooleanyesTrue when this was the thread's last comment, so the thread was deleted too.

CommentRecord​

One stored comment.

PropertyTypeRequiredDescription
idstringyesThe comment id.
thread_idstringyesThe thread the comment belongs to.
author_idstring or nullnoWho wrote it; null once that user has been deleted.
author_namestring or nullnoThe author's display name.
bodystringyesThe comment text, as Markdown.
mentionsarray of stringnoUser ids of the tenant members the body's @name tokens resolved to, server-side, when the comment was last written.
edited_atstring (date-time) or nullnoWhen the comment was last edited; null when never edited.
created_atstring (date-time)yesWhen the comment was written.

CommentThreadCreate​

Open a thread on an element, with its first comment.

Attributes: version: The version the element belongs to — its revision id or its version label. anchor_type: The kind of element. anchor_id: The element's stable id. Optional for a version anchor, where it can only be the version's own id. body: The first comment, as Markdown.

PropertyTypeRequiredDescription
versionstringyesVersion.
anchor_typeenum "class", "property", "path", "operation", "version"yesAnchor Type.
anchor_idstring or nullnoAnchor ID.
bodystringyesBody.

CommentThreadDetail​

A thread with every comment in it.

PropertyTypeRequiredDescription
threadCommentThreadRecordyesThread.
commentsarray of CommentRecordnoThe thread's comments, oldest first.

CommentThreadListResponse​

A page of a project's threads.

PropertyTypeRequiredDescription
threadsarray of CommentThreadSummarynoThreads, most recently active first.
countintegeryesHow many threads this page holds.
totalintegeryesHow many threads match the filters in all.
limitintegeryesThe page size used.
offsetintegeryesThe offset used.

CommentThreadRecord​

One stored thread, without its comments.

PropertyTypeRequiredDescription
idstringyesThe thread id.
tenant_idstringyesTenant that owns the resource.
project_idstringyesProject identifier the resource belongs to.
version_idstringyesThe version (revision) whose element is discussed.
anchor_typeenum "class", "property", "path", "operation", "version"yesThe kind of element the thread is anchored to.
anchor_idstringyesThe anchored element's stable id. Equals version_id for a version anchor. On an orphaned thread it is the id of the element that was deleted.
statusenum "open", "resolved", "orphaned"yesopen, resolved, or orphaned — the anchored element was deleted; relink the thread to re-attach it.
anchor_labelstring or nullnoThe deleted element's last-known label (Customer, Customer.email, /customers, GET /customers), captured when it was deleted. Set exactly while orphaned.
orphaned_atstring (date-time) or nullnoWhen the anchored element was deleted. Set exactly while orphaned.
created_bystring or nullnoWho opened the thread.
created_by_namestring or nullnoTheir display name.
resolved_bystring or nullnoWho resolved it, when resolved.
resolved_atstring (date-time) or nullnoWhen it was resolved.
created_atstring (date-time)yesCreation timestamp (ISO 8601).
updated_atstring (date-time)yesLast update timestamp (ISO 8601).
last_activity_atstring (date-time)yesThe latest reply or status change.
comment_countintegernoHow many comments the thread holds.

Re-attach an orphaned thread to another element of its own version.

Attributes: anchor_type: The kind of element to attach to. anchor_id: That element's stable id. Optional for a version anchor, where it can only be the thread's own version id.

PropertyTypeRequiredDescription
anchor_typeenum "class", "property", "path", "operation", "version"yesAnchor Type.
anchor_idstring or nullnoAnchor ID.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.