Skip to content

Create a work item comment ​

POST/api/v1/workspaces/{slug}/projects/{project_id}/work-items/{issue_id}/comments/

Add a new comment to a work item with HTML content.

Path Parameters ​

issue_id:requiredstring

Issue ID

project_id:requiredstring

Project ID

slug:requiredstring

Workspace slug

Body Parameters ​

comment_json:optionalobject

Comment json.

comment_html:optionalstring

Comment html.

access:optionalstring
  • INTERNAL - INTERNAL
  • EXTERNAL - EXTERNAL
external_source:optionalstring

External source.

external_id:optionalstring

External id.

parent:optionalstring

Parent.

Scopes ​

projects.work_items.comments:write

Create a work item comment
bash
curl -X POST \
  "https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/comments/" \
  -H "X-API-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "comment_html": "<p>Example content</p>",
  "external_id": "550e8400-e29b-41d4-a716-446655440000",
  "external_source": "github"
}'
Response201
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"
}