Skip to main content
Programmatically add comments to LinkedIn posts through OutX. Engage as a user or on behalf of a company, automate interactions, and keep conversations active without manual effort.

Request Body

post_id
string
required
The unique identifier of the post to comment on. This is the id field from the Posts API response.
user_email
string
required
Email address of the user who will comment on the post.
  • For user actor type: The user’s email
  • For company actor type: The admin user’s email who manages the company page
comment_text
string
required
The text content of the comment. Cannot be empty or whitespace-only.Tips for effective comments:
  • Be genuine and add value to the conversation
  • Keep it concise but meaningful
  • Ask questions to encourage engagement
  • Avoid generic responses like “Great post!”
actor_type
string
default:"user"
Who is posting the comment. Options:
  • user - Comment as an individual user
  • company - Comment on behalf of a company page
company_title
string
Required when actor_type is companyThe exact company name/title as it appears on LinkedIn. This is used to identify which company page should post the comment.
curl -X POST \
  "https://api.outx.ai/api-comment" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "post_id": "123e4567-e89b-12d3-a456-426614174000",
    "user_email": "john.doe@example.com",
    "comment_text": "Great insights! Thanks for sharing.",
    "actor_type": "user"
  }'
{
  "success": true,
  "message": "Comment task created successfully",
  "task_id": "789e0123-e45b-67d8-a901-234567890123"
}

Response Fields

success
boolean
Whether the comment task was created successfully
message
string
Human-readable message about the operation
task_id
string
Unique identifier for the created task. Use this to track the task status.

How It Works

1

Task Creation

When you call the Comment API, a task is created and queued for processing
2

Validation

The system validates:
  • Post exists and belongs to your team’s watchlists
  • User email is valid and associated with your team
  • Comment text is not empty
  • Company title matches (if commenting as company)
  • You haven’t exceeded plan limits
3

Asynchronous Processing

The comment is processed asynchronously by OutX’s automation system
4

Execution

The comment is posted on LinkedIn on behalf of the specified user or company

Actor Types Explained

User Actor Type

When actor_type is user:
  • The comment appears as coming from the individual user
  • user_email should be the email of the user who will comment
  • The user must be part of your OutX team
  • No company_title is needed
Use case: Personal engagement, thought leadership, networking

Company Actor Type

When actor_type is company:
  • The comment appears as coming from your company page
  • user_email should be the admin user’s email who manages the company page
  • company_title must exactly match the company name on LinkedIn
  • The admin user must have permission to manage the company page
Use case: Brand engagement, company thought leadership, B2B marketing

Error Responses

Status CodeError MessageDescription
400Missing required parameter: post_idpost_id is required
400Missing required parameter: user_emailuser_email is required
400Missing required parameter: comment_textcomment_text is required
400comment_text cannot be emptyComment text is whitespace-only
400Invalid actor_typeMust be ‘user’ or ‘company’
400company_title is required when actor_type is ‘company’Missing company title
400Post does not support comment functionalityPost is missing required data
401UnauthorizedInvalid or missing API key
403Access deniedPost doesn’t belong to your team’s watchlists
404Post not foundInvalid post ID
404User not foundInvalid user email
404Company not foundCompany title doesn’t match any company for the admin user
429Plan limit reachedYou’ve exceeded your plan’s comment limit

Best Practices

  • Add value to the conversation
  • Share relevant experiences or insights
  • Ask thoughtful questions
  • Avoid generic responses
  • Be authentic and genuine
  • Keep comments concise but substantive
  • Don’t comment on too many posts at once
  • Spread comments throughout the day
  • Monitor your plan limits
  • Implement delays between API calls
  • Quality over quantity
  • Reference specific points from the post
  • Tailor comments to the context
  • Use the author’s name when appropriate
  • Avoid copy-paste comments
  • Make each comment unique