Skip to main content

Get Posts Count

Get the total number of posts, optionally scoped to a specific group.

Endpoint​

GET /api/posts/count

Authentication​

Required.

Query Parameters​

ParameterTypeRequiredDescription
groupIdintegerNoScope count to a specific group. Without it, returns platform-wide count.

Response​

Success Response​

Status Code: 200 OK

{
"count": 42
}

Error Responses​

Status CodeDescription
400Invalid groupId parameter
403Not a member of the specified group

Example​

curl -X GET "https://api.tribesocial.io/api/posts/count?groupId=32" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"