POST /v1/users/activity/stats with identifier and identifier_type → use daily XP and coin changes for a specific date.identifier_type is email or userId (numeric platform id). userID is rejected.Authorization: Bearer <COMMUNITY_API_KEY>. Required permission: getUserStats. Keep the key server-side.userId (200). message is User gamification stats fetched successfully. data includes user_id, range.start_date, range.end_date, totals (messages, replies, reaction, socials), and daily_stats[] with per-day counts."identifier_type": "userID" returns Get user activity stats endpoint validation error. detail.identifier_type: Invalid enum value. Expected 'userId' | 'email', received 'userID'.detail.identifier: Required and detail.identifier_type: Required.200. Repeat the same POST to refresh. This is a read.| Status | When | Recovery |
|---|---|---|
400 invalid identifier_type | userID or other spelling | Send email or userId. |
400 required fields | Missing identifier / identifier_type | Send both. |
401 | Missing or invalid token | Add a valid community key with getUserStats. |
userId, not userID.reaction is the totals field name (singular).curl --location 'https://adss-integration.returning.ai/apis/v1/users/activity/stats' \
--header 'Content-Type: application/json' \
--data-raw '{
"identifier": "email1@test.com",
"identifier_type": "email",
"days": 30
}'{
"status": "success",
"message": "User gamification stats fetched successfully",
"data": {
"user_id": "188055",
"range": {
"start_date": "2025-08-18",
"end_date": "2025-08-18"
},
"totals": {
"messages": 0,
"replies": 1,
"reaction": 0,
"socials": 0
},
"daily_stats": [
{
"date": "2025-08-18",
"messages": 0,
"replies": 1,
"reaction": 0,
"socials": 0
}
]
}
}