---
title: "Comment on a post"
method: POST
path: "/v1/actions/comment_on_post"
tags: ["Posts"]
---

# Comment on a post

`POST /v1/actions/comment_on_post`

## Request

- Base URL: `https://api.heyreagent.com`
- URL: `https://api.heyreagent.com/v1/actions/comment_on_post`
- Auth: HTTP bearer

Comment on one post, or answer one comment on it.

postUrl takes the post's link or its socialId; the action resolves a link to the socialId itself. A bare post id is refused.

Docs: https://heyreagent.com/docs/actions/comment_on_post

## Request body

- object
  - `postUrl` string, required: The LinkedIn post URL.
  - `text` string, required: The comment text.
  - `replyToCommentId` string: Id of a comment on that post to reply to (from list_post_comments).
  - `mentions` object[]: People or companies to mention. Put {{0}}, {{1}}, … in the text where each one goes (its position in this list).
    - `name` string, required: The name as it should appear in the text.
    - `profileId` string, required: The LinkedIn member id of the person (starts with ACo or ADo), or the numeric id of a company.
    - `isCompany` boolean: True when the mention is a company.
  - `link` string, uri: A link to show as a preview card. It should also appear in the text; otherwise LinkedIn adds it at the end.
  - `imageUrl` string, uri: One image to attach (a public https link, up to 10 MB).
  - `asOrganization` string: Act as a company page you administer instead of yourself: that page's numeric id. No action here lists the pages you administer.
  - `connectionId` string: Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one.

## Response `200`

It worked. Inside result: sent, postUrl, asReply, commentId, from, usedToday, dailyLimit.

- Worked
  - `ok` true, required
  - `result` object, required: What was asked for. A field that does not apply is left out, or is null.

## Other responses

- `default`: It did not work. The message says why, in plain English.

---

[API](https://skmtc.dev/heyreagent/apis/heyreagent-api.md) · [All operations](https://skmtc.dev/heyreagent/apis/heyreagent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/heyreagent/apis/heyreagent-api/revisions/917360c5f841?raw)
