---
title: 'Get social posts'
description: 'Fetch social posts with pagination and filtering options. Note: Rank is calculated for top 20,000 posts only. Posts beyond this threshold will have a null rank.'
openapi: GET /api/loyalty/posts
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

`GET /api/loyalty/posts` — query parameters: `websiteId`, `organizationId`, `userGroupId`, `userId`, `loyaltyPostId`, `cursor`, `limit`, `sortBy`

`GET https://admin.snagsolutions.io/api/loyalty/posts`

Fetch social posts with pagination and filtering options. Note: Rank is calculated for top 20,000 posts only. Posts beyond this threshold will have a null rank.

## Authentication

No authentication required.

## Query parameters

- `websiteId` (string) — UUID of the website to fetch social posts for
- `organizationId` (string) — UUID of the organization to fetch social posts for
- `userGroupId` (string) — Optional UUID of the user group to filter posts
- `userId` (string) — Optional UUID of the user to filter posts
- `loyaltyPostId` (string) — Optional UUID of the loyalty post to filter posts
- `cursor` (string) — Cursor for pagination
- `limit` (integer) — Number of posts to fetch per page
- `sortBy` (string) — Sort posts by createdAt or rank

## Response 200

200
  - response (object) — Response containing social posts with pagination info
    - `data` (array, required)
      - `items` (object) — A social media post
        - `id` (string, uuid, required)
        - `text` (string)
        - `mediaUrl` (string)
        - `previewUrl` (string)
        - `externalIdentifier` (string)
        - `latestReward` (number)
        - `loyaltyCurrencyId` (string, uuid, required)
        - `userMetadata` (object, required)
          - `userId` (string, uuid, required)
          - `logoUrl` (string)
          - `twitterUser` (string, required)
          - `twitterUserId` (string, uuid, required)
          - `twitterUserFollowersCount` (number, required)
          - `twitterVerifiedAccount` (boolean, required)
        - `mediaType` (string, required, one of: image, video)
        - `platform` (string, required, one of: twitter, tiktok)
        - `postType` (string, required, one of: post, comment, repost)
        - `parentPostId` (string, uuid)
        - `likeCount` (number)
        - `commentCount` (number)
        - `repostCount` (number)
        - `viewCount` (number)
        - `manualRank` (number)
        - `dynamicScore` (number)
        - `rank` (number)
        - `loyaltyRuleId` (string, uuid, required)
        - `contentQualityScore` (number)
        - `sentimentScore` (integer)
        - `postedAt` (string, date-time)
        - `isSeen` (boolean, required)
        - `authorId` (string, required)
        - `userId` (string, uuid, required)
        - `createdAt` (string, date-time, required)
        - `updatedAt` (string, date-time, required)
    - `hasNextPage` (boolean, required)

## Response 403

403
  - response (object) — Schema for forbidden response
    - `message` (string, required) — Error message

## Response 500

500
  - response (object) — Schema for internal server error response
    - `success` (boolean, required) — Indicates operation success
    - `message` (string, required) — Error message
    - `debugInfo` (string) — Optional debug information


---

📦 **OpenAPI specs:** Every OpenAPI specification referenced by this documentation is available as a single download — https://docs.snagsolutions.io/api-specs.zip
