> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tapti.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish Comment

> Publishes a new comment on a content item or content group. This tool enables you to post comments on behalf of a user account to engage with content across various platforms.

<Info>
  This tool is part of the [Comment Tools](./index) category.
</Info>

## Parameters

| Name                  | Type   | Required | Description                                                |
| --------------------- | ------ | -------- | ---------------------------------------------------------- |
| user\_account\_id     | string | Yes\*    | The ID of the user account to publish the comment from     |
| platform\_account\_id | string | Yes\*    | The platform account ID (alternative to user\_account\_id) |
| content\_id           | string | No\*\*   | The ID of the content to comment on                        |
| content\_group\_id    | string | No\*\*   | The ID of the content group to comment on                  |
| parent\_id            | string | No       | The ID of the parent comment (for replies)                 |
| text                  | string | Yes      | The text content of the comment                            |

\*Either `user_account_id` or `platform_account_id` must be provided.\
\*\*Either `content_id` or `content_group_id` must be provided.

## Example Request

```json theme={null}
{
  "user_account_id": "ua_123456",
  "content_id": "cont_789012",
  "text": "Great content! Love the insights provided."
}
```

## Example Response

```json theme={null}
{
  "comment_id": "comm_345678",
  "status": "published"
}
```

## Usage Notes

* You must provide either a `content_id` or a `content_group_id` to specify where the comment should be posted.
* To create a reply to an existing comment, provide the `parent_id` parameter.
* The comment will be published using the credentials of the specified user account.
* If successful, the response will include the new comment ID and status.
* Platforms may have different rate limits or restrictions on comment publishing.

## Error Handling

If comment publishing fails, an error will be returned with details about the failure. Common errors include:

* Authentication failures
* Content not found
* Rate limiting
* Content or account restrictions

## Related Tools

* [Get Comments](./getComments) - Retrieve comments for specific content
* [Get Comment](./getComment) - Get a specific comment by ID
* [Refresh Comments](./refreshComments) - Refresh comment data from the platform
