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

# Unipile: Comment On Post

> Publishes a public comment on a post, or a reply to a comment, from the customer’s connected account. Image uploads are not supported through Deepline.

Publishes a public comment on a post, or a reply to a comment, from the customer’s connected account.

> [!NOTE]
>
> Tool ID: `unipile_comment_on_post`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'unipile_comment_on_post',
  {
    "post_id": "post_123",
    "account_id": "123456789",
    "text": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_comment_on_post --input '{
  "post_id": "post_123",
  "account_id": "123456789",
  "text": "example"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "CommentSent"
  }
}
```

Use `deepline describe unipile_comment_on_post --json` for the latest machine-readable contract.

## Input reference

Comment a post or reply to a post comment.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.post_id` | `string` | Yes | — | The ID of the associated post. `Linkedin`: use the `social_id` from the post object (GET post or list posts). The post id visible in url will not work in all case, you can refer here for more details : [https://developer.unipile.com/docs/posts-and-comments](https://developer.unipile.com/docs/posts-and-comments) `Instagram` Post short code dont work on this route, please use the provider\_id instead. |
| `payload.account_id` | `string` | Yes | — | The id of the account to perform the request from. Minimum length: 1. |
| `payload.text` | `string` | Yes | — | `Linkedin`: You can add a mention by inserting the index of the corresponding entry from the mentions array between two double braces. Example: Hey \{\{0}}, check this out ! `Instagram`: You can mention users by inserting their username in the text, like @username. Minimum length: 1. Maximum length: 1250. |
| `payload.mentions` | `array` | No | — | `Linkedin only` |
| `payload.external_link` | `string` | No | — | `Linkedin only` An external link that should be displayed within a preview card. The URL must also be included in the post textual content. Otherwise, it will be automatically added at the end. Pattern: `^https?://`. |
| `payload.as_organization` | `string` | No | — | `Linkedin only` Provide the ID of an organization over which you have control to perform the action on its behalf. Minimum length: 1. |
| `payload.comment_id` | `string` | No | — | The id of the comment to reply to. `Linkedin`: use the comment id returned by the comments list. Minimum length: 1. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Comment a post or reply to a post comment.",
    "properties": {
      "post_id": {
        "type": "string",
        "description": "The ID of the associated post. `Linkedin`: use the `social_id` from the post object (GET post or list posts). The post id visible in url will not work in all case, you can refer here for more details : https://developer.unipile.com/docs/posts-and-comments `Instagram` Post short code dont work on this route, please use the provider_id instead."
      },
      "account_id": {
        "type": "string",
        "description": "The id of the account to perform the request from.",
        "minLength": 1
      },
      "text": {
        "type": "string",
        "description": "`Linkedin`: You can add a mention by inserting the index of the corresponding entry from the mentions array between two double braces. Example: Hey {{0}}, check this out ! `Instagram`: You can mention users by inserting their username in the text, like @username.",
        "minLength": 1,
        "maxLength": 1250
      },
      "mentions": {
        "type": "array",
        "description": "`Linkedin only`",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the user as it will be displayed in your message."
            },
            "profile_id": {
              "type": "string",
              "description": "The provider ID of the user, which begins with ACo/ADo for individuals and is a series of digits for companies."
            },
            "is_company": {
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "profile_id"
          ],
          "additionalProperties": false
        }
      },
      "external_link": {
        "type": "string",
        "description": "`Linkedin only` An external link that should be displayed within a preview card. The URL must also be included in the post textual content. Otherwise, it will be automatically added at the end.",
        "pattern": "^https?://"
      },
      "as_organization": {
        "type": "string",
        "description": "`Linkedin only` Provide the ID of an organization over which you have control to perform the action on its behalf.",
        "minLength": 1
      },
      "comment_id": {
        "type": "string",
        "description": "The id of the comment to reply to. `Linkedin`: use the comment id returned by the comments list.",
        "minLength": 1
      }
    },
    "required": [
      "post_id",
      "account_id",
      "text"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"CommentSent"` | Yes | — | Allowed: `CommentSent`. |
| `result.data.comment_id` | `string` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "CommentSent"
            ]
          },
          "comment_id": {
            "type": "string"
          }
        },
        "required": [
          "object"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.