# comment_on_post: Comment on a post

Comment on one post, or answer one comment on it. This action can change or spend something, and it happens right away. Plan: Free and Connect.

```
POST https://api.heyreagent.com/v1/actions/comment_on_post
Authorization: Bearer YOUR_KEY
content-type: application/json

{
  "postUrl": "PASTE_POST_LINK_HERE",
  "text": "Hello!"
}
```

## What you give it

- `postUrl` (needed): a post link or a post social id. The LinkedIn post URL. Where to get it: On LinkedIn, click the More icon (the three dots) at the top right of the post, then "Copy link to post". Or: Run `search_posts` and use `posts[].url`.
- `text` (needed): text, up to 1250 characters. The comment text.
- `replyToCommentId` (optional): a comment id. Id of a comment on that post to reply to (from list_post_comments). Where to get it: Run `list_post_comments` and use `comments[].id`.
- `mentions` (optional): a list (a group of fields), up to 20. People or companies to mention. Put {{0}}, {{1}}, … in the text where each one goes (its position in this list).
  - `name` (needed): text. The name as it should appear in the text.
  - `profileId` (needed): a member id or a company id. The LinkedIn member id of the person (starts with ACo or ADo), or the numeric id of a company. Where to get it: Run `get_profile_details` and use `providerId`.
  - `isCompany` (optional): true or false. True when the mention is a company.
- `link` (optional): a link. A link to show as a preview card. It should also appear in the text; otherwise LinkedIn adds it at the end.
- `imageUrl` (optional): a link. One image to attach (a public https link, up to 10 MB).
- `asOrganization` (optional): a organization id. Act as a company page you administer instead of yourself: that page's numeric id. No action here lists the pages you administer.
- `connectionId` (optional): a connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.

## What you get back

- `sent`
- `postUrl`
- `asReply`
- `commentId`: a comment id
- `from`: the account it ran on
- `usedToday`: number
- `dailyLimit`: number

## Good to know

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

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