TeamGriddeveloper
TeamGrid Developer

comments SDK client

5 typed @teamgrid/api-client methods for Collaboration, plus 1 convenience helper.

Client propertyclient.comments
Mapped operations5
API groupsCollaboration

Operation methods

Parameter declarations below are taken from the pinned TypeScript source. Request fields and responses are summarized from the matching OpenAPI operation; follow the API link for every field, constraint, example, and error description.

GET/comments
Full API operation →

comments.list

Returns strict comment DTOs for one tenant-owned task, project, or contact after target-domain scope and plan authorization.

client.comments.list(options: CommentListOptions)
Return form
Promise
Operation ID
listComments
Required scopes
comments:read
Conditional scopes
contacts:readprojects:readtasks:read
SDK parameters
options: CommentListOptions
Query request fields
cursor?: stringlimit?: integerarchived?: booleantargetType: stringtargetId: string
Success
200 Array<Comment> envelope
Declared API errors
400401403429502503
POST/comments
Full API operation →

comments.create

Creates plain-text product comments with canonical active-member mentions. Attachments and rich internal payloads are not accepted.

client.comments.create(data: CommentCreate, options: MutationOptions = {})
Return form
Promise
Operation ID
createComment
Required scopes
comments:write
Conditional scopes
contacts:readprojects:readtasks:read
SDK parameters
data: CommentCreateoptions: MutationOptions
Header request fields
Idempotency-Key: string
Request body
CommentCreateapplication/json
Success
201 Comment envelope
Declared API errors
400401403409429502503
GET/comments/{id}
Full API operation →

comments.get

Use this operation to get a comment. It returns the resource only when it belongs to the authenticated workspace and is visible to the credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.

client.comments.get(id: string, options?: RequestOptions)
Return form
Promise
Operation ID
getComment
Required scopes
comments:read
Conditional scopes
contacts:readprojects:readtasks:read
SDK parameters
id: stringoptions: RequestOptions
Path request fields
id: string
Success
200 Comment envelope
Declared API errors
400401403404429502503
DELETE/comments/{id}
Full API operation →

comments.archive

Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.

client.comments.archive(id: string, options: CommentMutationOptions)
Return form
Promise
Operation ID
archiveComment
Required scopes
comments:write
Conditional scopes
contacts:readprojects:readtasks:read
SDK parameters
id: stringoptions: CommentMutationOptions
Path request fields
id: string
Header request fields
If-Match: string
Success
200 Comment envelope
POST/comments/{id}/restore
Full API operation →

comments.restore

Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.

client.comments.restore(id: string, options: CommentMutationOptions)
Return form
Promise
Operation ID
restoreComment
Required scopes
comments:write
Conditional scopes
contacts:readprojects:readtasks:read
SDK parameters
id: stringoptions: CommentMutationOptions
Path request fields
id: string
Header request fields
If-Match: string
Success
200 Comment envelope

Convenience helpers

These typed helpers compose mapped operations. They do not grant scopes or bypass API limits.

comments.pages

Iterate cursor pages with a bounded PaginationOptions policy.

client.comments.pages(options: CommentListOptions, pagination?: PaginationOptions)
Returns AsyncGenerator

Errors and transport metadata

HTTP failures reject with TeamGridApiError, including the status, stable error documents, request ID, optional retry delay, and transport metadata. Local validation, routing, timeout, response-size, and pagination failures reject withTeamGridClientError and a stable client error code. Successful envelopes expose non-enumerable transport metadata.

See pagination and errors andclient configuration for handling guidance.

Stable documentation · Developer Platform · Reviewed 2026-08-10Edit this page ↗
Documentation feedbackWas this page useful?
Esc

Search TeamGrid Developer

Find guides, concepts and every API operation.