Skip to content
campaiDeveloper
campai.com

Crm · Social posts

GET/{organizationId}/crm/communication/socialPosts/statisticsReads only

Get social media statistics

Returns the social media publications of a period and of the period of the same length right before it: how many deliveries were published, their views, their engagement (likes, comments and shares) and the engagement rate of the publications with views, attributed to the day they were published. Also returns the publications per month and platform, the views and engagement per month, every channel with its publications, views, followers and whether the platform provides statistics for it, and the five publications with the most views. With an account ID, the figures only cover that channel and the daily figures of the channel are returned as well; the channel list always covers every channel. Figures exist only for publications and days the statistics were fetched for

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • social.read

Request

Path parameters

  • organizationIdidrequired

Query parameters

  • fromDatestringrequired
  • toDatestringrequired
  • accountIdidrequirednullable
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/crm/communication/socialPosts/statistics' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • summaryobject
    11 properties
    • publishedinteger

      at least 0

    • previousPublishedinteger

      at least 0

    • viewsinteger

      at least 0

    • previousViewsinteger

      at least 0

    • likesinteger

      at least 0

    • commentsinteger

      at least 0

    • sharesinteger

      at least 0

    • engagementinteger

      at least 0

    • previousEngagementinteger

      at least 0

    • engagementRatenumbernullable

      at least 0

    • previousEngagementRatenumbernullable

      at least 0

  • monthsobject[]
    4 properties
    • datestring
    • publishedobject[]
      2 properties
      • platformstring
        facebook linkedin tiktok instagram pinterest youtube bluesky threads wordpress googleMyBusiness
      • countinteger

        at least 0

    • viewsinteger

      at least 0

    • engagementinteger

      at least 0

  • channelsobject[]
    11 properties
    • _idid
    • namestring
    • providerstring
      13 values
      facebook linkedin linkedinPage tiktok tiktokBusiness instagram instagramStandalone pinterest youtube bluesky threads wordpress googleMyBusiness
    • platformstring
      facebook linkedin tiktok instagram pinterest youtube bluesky threads wordpress googleMyBusiness
    • statusstring
      connected disconnected reconnectRequired
    • statisticsStatusstring
      pending available missingPermission unsupported
    • publishedinteger

      at least 0

    • viewsintegernullable

      at least 0

    • engagementintegernullable

      at least 0

    • followersintegernullable

      at least 0

    • followersGainedintegernullable

      at least 0

  • topPostsobject[]
    10 properties
    • postIdid
    • accountIdid
    • accountNamestring
    • providerstring
      13 values
      facebook linkedin linkedinPage tiktok tiktokBusiness instagram instagramStandalone pinterest youtube bluesky threads wordpress googleMyBusiness
    • platformstring
      facebook linkedin tiktok instagram pinterest youtube bluesky threads wordpress googleMyBusiness
    • textstring
    • urlstringnullable
    • publishedAtstring · date-time
    • viewsintegernullable

      at least 0

    • engagementinteger

      at least 0

  • daysobject[]nullable
    12 properties
    • followersintegernullable

      at least 0

    • followersGainedintegernullable

      at least 0

    • followersLostintegernullable

      at least 0

    • viewsintegernullable

      at least 0

    • reachintegernullable

      at least 0

    • engagementsintegernullable

      at least 0

    • clicksintegernullable

      at least 0

    • watchMinutesintegernullable

      at least 0

    • websiteClicksintegernullable

      at least 0

    • callsintegernullable

      at least 0

    • directionRequestsintegernullable

      at least 0

    • datestring
Response200
{
  "summary": {
    "published": 0,
    "previousPublished": 0,
    "views": 0,
    "previousViews": 0,
    "likes": 0,
    "comments": 0,
    "shares": 0,
    "engagement": 0,
    "previousEngagement": 0,
    "engagementRate": 0,
    "previousEngagementRate": 0
  },
  "months": [
    {
      "date": "string",
      "published": [
        {
          "platform": "facebook",
          "count": 0
        }
      ],
      "views": 0,
      "engagement": 0
    }
  ],
  "channels": [
    {
      "_id": "000000000000000000000001",
      "name": "string",
      "provider": "facebook",
      "platform": "facebook",
      "status": "connected",
      "statisticsStatus": "pending",
      "published": 0,
      "views": 0,
      "engagement": 0,
      "followers": 0,
      "followersGained": 0
    }
  ],
  "topPosts": [
    {
      "postId": "000000000000000000000001",
      "accountId": "000000000000000000000001",
      "accountName": "string",
      "provider": "facebook",
      "platform": "facebook",
      "text": "string",
      "url": "string",
      "publishedAt": "2026-06-15T22:30:00Z",
      "views": 0,
      "engagement": 0
    }
  ],
  "days": [
    {
      "followers": 0,
      "followersGained": 0,
      "followersLost": 0,
      "views": 0,
      "reach": 0,
      "engagements": 0,
      "clicks": 0,
      "watchMinutes": 0,
      "websiteClicks": 0,
      "calls": 0,
      "directionRequests": 0,
      "date": "string"
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.