Comment Post API

K
Kavya M

Comment Post

The Comment API lets you programmatically automate comments to LinkedIn posts through OutXAI.

Use it to engage as a user or on behalf of a company, automate interactions, and keep conversations active without manual effort.

Quick Set up Guide

  • To get your API KEY mail us support@outx.ai
  • Create a watchlist using the POST endpoint
  • Retrieve posts using the GET endpoint with your watchlist ID
  • Update watchlist settings as needed using the PUT endpoint
  • Like and Comment using Engagement APIs

Curl

curl -X POST 'https://cafqluqomuhgtchexldv.supabase.co/functions/v1/api-comment'
  -H 'Content-Type: application/json'
  -H 'x-api-key: YOUR_TEAM_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"
  }'

Authentication

  • x-api-key: “YOUR TEAM API KEY HERE”

Required Parameters

ParameterTypeDescription
post_idstringUUID of the post to comment on (from api-posts response)
user_emailstringFor user: User's email For company: Admin email of the company
comment_textstringThe comment text content (cannot be empty)

Optional / Conditional Parameters:

ParameterTypeDescription
actor_typestring"user" or "company" (defaults to "user")
company_titlestring**Required when actor_type is "company"**Exact company title/name from LinkedIn

Request Body

User Comment:

{
  "post_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_email": "john.doe@example.com",
  "comment_text": "Great insights! Thanks for sharing.",
  "actor_type": "user"
}

Company Comment:

{
  "post_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_email": "admin@company.com",
  "comment_text": "Excellent points from our team perspective!",
  "actor_type": "company",
  "company_title": "Acme Corporation"
}

Response

{
  "success": true,
  "message": "Comment task created successfully",
  "task_id": "789e0123-e45b-67d8-a901-234567890123"
}
FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringHuman-readable confirmation message
task_idstringUnique ID of the created comment task

Errors

Status CodeError MessageDescription
400"Missing required parameters"A required field (e.g., post_id, user_email, or comment_text) was not provided
401"Unauthorized: Invalid API key"The request did not include a valid x-api-key
403"Company '[title]' not found or user is not an admin of this company in the current team"The company name is invalid or the requesting user lacks admin rights
500"Internal server error" Contact support @OutXAIA server-side error occurred — contact support for help

For more information about the OutXAI API, feel free to contact us at support@outx.ai.


Track LinkedIn posts, job changes, birthdays, and keywords — never miss a sales trigger.
No Credit Card Required. Cancel anytime.