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.
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
Required Parameters
Parameter | Type | Description |
---|---|---|
post_id | string | UUID of the post to comment on (from api-posts response) |
user_email | string | For user: User's email For company: Admin email of the company |
comment_text | string | The comment text content (cannot be empty) |
Optional / Conditional Parameters:
Parameter | Type | Description |
---|---|---|
actor_type | string | "user" or "company" (defaults to "user") |
company_title | string | **Required when actor_type is "company"**Exact company title/name from LinkedIn |
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"
}
{
"success": true,
"message": "Comment task created successfully",
"task_id": "789e0123-e45b-67d8-a901-234567890123"
}
Field | Type | Description |
---|---|---|
success | boolean | Indicates if the request was successful |
message | string | Human-readable confirmation message |
task_id | string | Unique ID of the created comment task |
Status Code | Error Message | Description |
---|---|---|
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 @OutXAI | A server-side error occurred — contact support for help |
For more information about the OutXAI API, feel free to contact us at support@outx.ai.