API Endpoint
POST Comment Analyze API
/api/v1/ai/comment-analyze
Analyze sentiment, intent category, topics, reply requirements, recommended actions, and priority of a single social media comment.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
comment |
string | Required | The social media comment text (Max: 5,000 characters). |
language |
string | Optional | Optional comment language identifier. |
platform |
string | Optional | Optional platform name (e.g. "Instagram", "Facebook", "YouTube", "LinkedIn"). |
post_context |
string | Optional | Optional post content or media brief context. |
business_context |
string | Optional | Optional business, product, or account rules context. |
author_context |
string | Optional | Optional commenter context details. |
model |
string | Optional | Optional AI model to use. |
Example Request
This example demonstrates how to request an analysis of a single Instagram comment with post and business contexts.
JSON Request
{
"comment": "Do you ship to Mumbai? I would love to order this today!",
"platform": "Instagram",
"post_context": "Photo of our new handcrafted leather boots collection",
"business_context": "We are an artisanal e-commerce shop delivering worldwide. Shipping is free within India."
}
cURL
curl -X POST https://rsflowhub.com/api/v1/ai/comment-analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"comment": "Do you ship to Mumbai? I would love to order this today!",
"platform": "Instagram",
"post_context": "Photo of our new handcrafted leather boots collection",
"business_context": "We are an artisanal e-commerce shop delivering worldwide. Shipping is free within India."
}'
Example Response
The response details comment intent classification, reply requirements, recommended priority, and action recommendation.
JSON Response
{
"success": true,
"data": {
"result": {
"sentiment": "positive",
"intent": "purchase_interest",
"language": "en",
"topics": [
"shipping",
"Mumbai",
"order interest"
],
"requires_reply": true,
"priority": "high",
"recommended_action": "reply",
"confidence": 0.98
}
},
"meta": {
"credits_used": 1,
"credits_remaining": 999
}
}
API Request Example
Use the cURL snippet below to test the endpoint.
cURL
curl -X POST 'https://rsflowhub.com/api/v1/ai/comment-analyze' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"comment": "Do you ship to Mumbai? I would love to order this today!",
"platform": "Instagram",
"post_context": "Photo of our new handcrafted leather boots collection",
"business_context": "We are an artisanal e-commerce shop delivering worldwide. Shipping is free within India."
}'