Document collaboration
List document discussion threads
Authorization
bearerAuth AuthorizationBearer <token>
A personal API key (psk_…) or an OAuth access token (plan_at_…). Scopes: read, write.
In: header
Path Parameters
documentId*string
The documentId.
Query Parameters
cursor?string
Opaque cursor returned by the preceding page.
knownRevisions?string
JSON object of up to 500 thread IDs and revision hashes from a prior page. Unchanged threads are omitted from threads; order still lists the complete current page.
discussionPlanId?string
Required discussion partition for plan/context conversations.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/documents/string/threads"{ "document": { "id": "string", "kind": "string", "target": { "kind": "plan-item", "itemId": "f11b669d-7201-4c21-88af-d85092f0c005" }, "title": "string", "canonicalUrl": "string", "revision": "string", "path": "string", "sourceDocumentId": "string", "sourceRevision": "string", "applyMode": "native", "capabilities": { "canComment": true, "canSuggest": true, "canMaintain": true, "canUseAgent": true, "needsDiscussionPlan": true }, "discussionPlanId": "string", "ownerUserIds": [ "string" ], "ownerNames": [ "string" ] }, "threads": [ { "id": "string", "documentId": "string", "discussionPlanId": "string", "kind": "string", "state": "OPEN", "version": 0, "anchor": { "kind": "document" }, "author": { "userId": "string", "name": "string", "kind": "member" }, "createdAt": "string", "updatedAt": "string", "resolvedAt": "string", "resolvedBy": "string", "commentCount": 0, "comments": [ { "id": "string", "threadId": "string", "author": { "userId": "string", "name": "string", "kind": "member" }, "body": { "markdown": "string", "mentions": [] }, "state": "PUBLISHED", "version": 0, "createdAt": "string", "editedAt": "string", "canEdit": true, "canDelete": true, "canModerate": true } ], "nextCommentCursor": "string", "canResolve": true, "canReopen": true, "canReattach": true, "subscription": "auto", "handoff": { "id": "string", "chatUrl": "string", "sentAt": "string", "needsResolution": true } } ], "nextCursor": "string", "order": [ "string" ], "revisions": { "property1": "string", "property2": "string" }}