Modify the content of an existing comment on a work item.
work_item_id
The unique identifier of the work item.
resource_id
The unique identifier of the resource.
project_id
The unique identifier of the project.
workspace_slug
The workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
https://app.plane.so/my-team/projects/
my-team
comment_json
The comment as a JSON object.
comment_html
The comment as an HTML string.
access
Comment visibility: INTERNAL or EXTERNAL.
INTERNAL
EXTERNAL
external_source
The system external_id came from, for example github or jira.
external_id
github
jira
Your system's identifier for this record, for sync and import correlation.
parent
ID of the parent comment, when this comment is a reply.
projects.work_items.comments:write
curl -X PATCH \ "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-items/work-item-uuid/comments/resource-id-uuid/" \ -H "X-API-Key: $PLANE_API_KEY" \ # Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "comment_html": "<p>Example content</p>", "external_id": "550e8400-e29b-41d4-a716-446655440000", "external_source": "github" }'
import requests response = requests.patch( "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-items/work-item-uuid/comments/resource-id-uuid/", headers={"X-API-Key": "your-api-key"}, json={ "comment_html": "<p>Example content</p>", "external_id": "550e8400-e29b-41d4-a716-446655440000", "external_source": "github" } ) print(response.json())
const response = await fetch( "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-items/work-item-uuid/comments/resource-id-uuid/", { method: "PATCH", headers: { "X-API-Key": "your-api-key", "Content-Type": "application/json", }, body: JSON.stringify({ comment_html: "<p>Example content</p>", external_id: "550e8400-e29b-41d4-a716-446655440000", external_source: "github", }), }, ); const data = await response.json();
{ "id": "550e8400-e29b-41d4-a716-446655440000", "comment_html": "<p>Example content</p>", "comment_json": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "This issue has been resolved by implementing OAuth 2.0 flow." } ] } ] }, "actor": { "id": "550e8400-e29b-41d4-a716-446655440000", "first_name": "John", "last_name": "Doe", "display_name": "Example Name", "avatar": "https://example.com/assets/example-image.png" }, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }
Update a work item comment
Modify the content of an existing comment on a work item.
Path parameters
work_item_id:requiredstringThe unique identifier of the work item.
resource_id:requiredstringThe unique identifier of the resource.
project_id:requiredstringThe unique identifier of the project.
workspace_slug:requiredstringThe workspace slug. It appears in your Plane URLs. In
https://app.plane.so/my-team/projects/, the slug ismy-team.Body parameters
comment_json:optionalobjectThe comment as a JSON object.
comment_html:optionalstringThe comment as an HTML string.
access:optionalstringComment visibility:
INTERNALorEXTERNAL.external_source:optionalstringThe system
external_idcame from, for examplegithuborjira.external_id:optionalstringYour system's identifier for this record, for sync and import correlation.
parent:optionalstringID of the parent comment, when this comment is a reply.
Scopes
projects.work_items.comments:write