---
updatedAt: 2026-06-16T07:30:12.000Z
agentTools:
  projectIndex: https://developers.getknit.dev/llms.txt
---

# Add Comment to a Ticket

Adds a new comment or reply to an existing support ticket.

# Supported Apps

<Accordion title="Intercom">
  **App ID**: `intercom`
</Accordion>

<Accordion title="Zendesk Ticketing">
  **App ID**: `zendesk-ticketing`
</Accordion>

<Accordion title="Freshdesk">
  **App ID**: `freshdesk`

  **Notes:**

  * **Required Field:** `body` (can be text or HTML)
  * **Honored Fields:** `body`, `author.id`
</Accordion>

<Accordion title="Zohodesk">
  **App ID**: `zoho-desk`

  **Notes:**

  * **Required Field:** At least one of `body` or `attachment.id` must be provided.
  * `body` can be **text** or **HTML**
</Accordion>

<Accordion title="Freshservice">
  **App ID**: `freshservice`

  **Notes:**

  * **Required Field:** `body` (can be text or HTML)
  * **Honored Fields:** `body`, `author.id`
</Accordion>

<Accordion title="Github">
  **App ID**: `github`

  **Notes:**

  * **Required Fields:**
    * `body`
    * `accountId` (Must be passed in metadata)
    * `collectionId` (Must be passed in metadata)
</Accordion>

<Accordion title="Jira">
  **App ID**: `jira`
</Accordion>

<Accordion title="Linear (linear)">
  **Supported Request Fields:**
  
  * `ticketId` - Required
  * `body` - Required

  **Supported Response Fields:**
  
  * `id`
</Accordion>

<Accordion title="ServiceNow (servicenow)">
  **Supported Request Fields:**
  
  * `ticketId` - Required
  * `body`
  * `isPublic`
</Accordion>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "base-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.getknit.dev/v1.0"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Knit-Integration-Id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/ticketing/ticket.comment.add": {
      "post": {
        "summary": "Add Comment to a Ticket",
        "description": "",
        "operationId": "add-comment-for-ticket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ticketId"
                ],
                "properties": {
                  "ticketId": {
                    "type": "string",
                    "description": "The Ticket ID for which you want to create the comment"
                  },
                  "body": {
                    "type": "string",
                    "description": "the body of the comment"
                  },
                  "author": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "the author id"
                      },
                      "type": {
                        "type": "string",
                        "description": "the type of author",
                        "enum": [
                          "CONTACT",
                          "USER"
                        ]
                      }
                    }
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "indicates whether the comment is a public comment"
                  },
                  "attachments": {
                    "type": "array",
                    "description": "attachments along with the comment",
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "the attachment name"
                        },
                        "content": {
                          "type": "string",
                          "description": "the file content of the attachment"
                        },
                        "url": {
                          "type": "string",
                          "description": "if you are providing the file URL, you do not need to provide the content"
                        },
                        "contentType": {
                          "type": "string",
                          "description": "The content-type of the document you are sending. When using a URL, this generally isn’t needed, as the responding server will deliver a content type. This should be included for encoded content.Click here to see examples - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types"
                        },
                        "id": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "type": "object"
                    }
                  },
                  "metadata": {
                    "type": "string",
                    "description": "additional metadata",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"the comment ID\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "the comment ID"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```