Get Published Posts
Retrieve published posts for a brand's connected social media profile. Specify the brand_id
, connected_profile_id
(from social-connect
), and post_type
. For LinkedIn, the limit
parameter is optional and ignored, retrieving all available posts. For other platforms (Facebook, Instagram, YouTube, Pinterest, TikTok, Google My Business), limit
is required and must be greater than 0. Response format varies by platform.
- Method: POST
- Endpoint:
/api/api-services/v1/brand-service/get-published-posts
- Returns: List of published posts with platform-specific details
Get Published Posts
POST https://app.brand2social.com/api/api-services/v1/brand-service/get-published-posts
Field | Type | Required | Description |
---|---|---|---|
Authorization | string (header) | Yes | Bearer token for authentication (requires ORG_ADMIN permission) |
brand_id | int64 | Yes | ID of the brand |
post_type | string | Yes | Type of post: POST , REELS , STORY (Facebook); POST , STORY (Instagram); POST (YouTube, LinkedIn, Pinterest, TikTok, Google My Business) |
connected_profile_id | int64 | Yes | ID of the connected social media profile (from social-connect ) |
limit | int64 | Yes (except LinkedIn) | Number of posts to retrieve (must be greater than 0 for non-LinkedIn platforms; ignored for LinkedIn) |
pagination | string | No | Pagination cursor for fetching additional results |
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/get-published-posts' \
--header 'Authorization: Bearer B2S_dummyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"brand_id": 123,
"post_type": "POST",
"connected_profile_id": 98765,
"limit": 10,
"pagination": ""
}'
Response (Facebook)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "fb_123",
"name": "Brand Page",
"url": "https://fb.com/brand.jpg",
"pagination": "next_cursor",
"followers_count": 10000,
"posts": [
{
"id": "post_001",
"description": "Check out our new product!",
"thumbnail": "https://fb.com/thumbnail.jpg",
"media_urls": ["https://fb.com/media1.jpg"],
"media_type": "IMAGE",
"like_count": 150,
"comment_count": 20,
"share_count": 10,
"created_time": "2025-08-23T04:07:00Z",
"link": "https://fb.com/post/001"
}
]
}
}
Response (Instagram)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "ig_123",
"name": "Brand Profile",
"profile_picture_url": "https://ig.com/profile.jpg",
"followers_count": 5000,
"pagination": "next_cursor",
"posts": [
{
"id": "post_002",
"thumbnail": "https://ig.com/thumbnail.jpg",
"media_urls": ["https://ig.com/media1.mp4"],
"media_type": "VIDEO",
"link": "https://ig.com/p/002",
"like_count": 200,
"comment_count": 30,
"share_count": 15,
"description": "New video release!",
"created_time": "2025-08-23T04:07:00Z"
}
]
}
}
Response (YouTube)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "yt_123",
"name": "Brand Channel",
"picture": "https://yt.com/channel.jpg",
"pagination": "next_page_token",
"subscriber_count": "1000",
"posts": [
{
"id": "video_001",
"title": "Product Demo",
"description": "Introducing our latest product!",
"like_count": "120",
"link": "https://youtu.be/video_001",
"comment_count": "25",
"view_count": "5000",
"created_time": "2025-08-23T04:07:00Z",
"thumbnail": "https://yt.com/thumbnail.jpg",
"privacy_status": "public"
}
]
}
}
Response (LinkedIn)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "li_123",
"name": "Brand Page",
"url": "https://linkedin.com/company.jpg",
"totalPageFollowers": 2000,
"pagination": "next_cursor",
"posts": [
{
"id": "post_003",
"description": "Join our webinar!",
"media_urls": [
{
"media_type": "IMAGE",
"media_urls": "https://linkedin.com/media.jpg"
}
],
"thumbnail_url": "https://linkedin.com/thumbnail.jpg",
"like_count": 50,
"comment_count": 10,
"share_count": 5,
"created_time": "2025-08-23T04:07:00Z",
"link": "https://linkedin.com/posts/003"
}
]
}
}
Response (Pinterest)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "pin_123",
"name": "Brand Board",
"picture": "https://pinterest.com/board.jpg",
"pagination": "next_bookmark",
"followersCount": 3000,
"posts": [
{
"id": "pin_001",
"description": "New product pin",
"title": "Product Launch",
"image_url": "https://pinterest.com/pin.jpg",
"created_time": "2025-08-23T04:07:00Z",
"link": "https://pinterest.com/pin/001",
"board_id": "board_456"
}
]
}
}
Response (TikTok)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "tt_123",
"name": "Brand Profile",
"url": "https://tiktok.com/profile.jpg",
"pagination": "next_cursor",
"follower_count": 4000,
"posts": [
{
"id": "video_002",
"description": "Dance challenge!",
"title": "Brand Dance",
"thumbnail": "https://tiktok.com/thumbnail.jpg",
"like_count": 300,
"comment_count": 50,
"share_count": 20,
"view_count": 10000,
"created_time": "2025-08-23T04:07:00Z",
"link": "https://tiktok.com/video/002"
}
]
}
}
Response (Google My Business)
{
"status": "SUCCESS",
"http_code": 200,
"message": "Fetched Published Posts Successfully",
"data": {
"id": "gmb_123",
"name": "Brand Location",
"url": "https://gmb.com/location.jpg",
"pagination": "next_page_token",
"averageRating": 4.5,
"totalReviewCount": 100,
"posts": [
{
"id": "post_004",
"description": "Visit our store!",
"image_url": "https://gmb.com/post.jpg",
"topic_type": "STANDARD",
"created_time": "2025-08-23T04:07:00Z",
"callToAction": {
"actionType": "BOOK",
"url": "https://gmb.com/book"
}
}
]
}
}
Error Response
{
"status": "FAILURE",
"http_code": 400,
"message": "limit must be greater than 0",
"data": ""
}