Generate a project summary
Generate an AI summary after mentions exist, then retrieve the stored summary later.
Prerequisites
- A bearer access token
- A keyword ID associated with collected mentions
Swagger names the path parameter keywordID. The current app flow uses the ID returned by project creation, but the contract does not formally document that mapping.
1. Generate the summary
The request has no body:
curl -X POST \
"$SOCIOVITE_API_URL/api/project/generate-summary/keyword_id" \
-H 'accept: application/json' \
-H 'Authorization: Bearer <access_token>'
Example 200 OK response:
{
"status": "success",
"keyword_id": "keyword_id",
"result": {
"summary": "Summary of the collected mentions.",
"metrics": {
"sentiment_distribution": {
"negative": 2,
"neutral": 4,
"positive": 8
}
}
}
}
The distribution returned here is an object whose keys are strings and values are integer counts.
Declared errors:
| Status | Meaning |
|---|---|
400 | Keyword ID is missing |
500 | Internal server error |
2. Retrieve the stored summary
curl \
"$SOCIOVITE_API_URL/api/project/summary/keyword_id" \
-H 'accept: application/json' \
-H 'Authorization: Bearer <access_token>'
Example 200 OK response:
{
"id": "summary_id",
"ai_summary": "Summary of the collected mentions.",
"sentiment_distribution": "{\"neutral\":4,\"negative\":2,\"positive\":8}",
"created_at": "2026-07-20T09:00:00Z",
"keyword_id": "keyword_id"
}
The stored-summary schema types sentiment_distribution as a string, not an object. Parse it as JSON only when the runtime value is valid serialized JSON.
Declared errors:
| Status | Meaning |
|---|---|
400 | Keyword ID is missing |
404 | No stored summary was found |
500 | Internal server error |
Which endpoint should you call?
| Need | Endpoint |
|---|---|
| Create or regenerate insights | POST /api/project/generate-summary/{keywordID} |
| Read an existing stored result | GET /api/project/summary/{keywordID} |
See the complete Project API summary reference.