Brand2Social API Documentation

Comprehensive guide to Brand2Social API endpoints

Get Next Nested Comments

Retrieve the next batch of nested comments (replies) for a specific comment on a social media post using a pagination cursor. Specify the brand_id, connected_profile_id (from social-connect), post_id (from get-published-posts or get-post-details), comment_id (from get-post-details or get-next-comments), and pagination (from get-post-details or get-next-comments). Supported platforms: Facebook, Instagram, YouTube, LinkedIn (pages only). Response includes nested comments and a new pagination cursor.

  • Method: POST
  • Endpoint: /api/api-services/v1/brand-service/get-next-nested-comments
  • Returns: Next batch of nested comments with pagination cursor

Get Next Nested Comments

POST https://app.brand2social.com/api/api-services/v1/brand-service/get-next-nested-comments

FieldTypeRequiredDescription
Authorizationstring (header)YesBearer token for authentication (requires ORG_ADMIN permission)
brand_idint64YesID of the brand
connected_profile_idint64YesID of the connected social media profile (from social-connect)
post_idstringYesID of the post (from get-published-posts or get-post-details)
comment_idstringYesID of the comment (from get-post-details or get-next-comments)
paginationstringYesPagination cursor from a previous get-post-details or get-next-comments response
    
    
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/get-next-nested-comments' \
  --header 'Authorization: Bearer B2S_dummyToken' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "brand_id": 123,
    "connected_profile_id": 98765,
    "post_id": "post_001",
    "comment_id": "comment_002",
    "pagination": "nested_cursor"
}'
    
  

Response (Facebook)

{
  "status": "SUCCESS",
  "http_code": 200,
  "message": "Fetched next nested comments successfully",
  "data": {
    "nested_comments": [
      {
        "id": "reply_003",
        "username": "user5",
        "user_id": "fb_user_005",
        "created_time": "2025-08-23T06:16:00Z",
        "text": "Thanks for sharing!",
        "image_url": "https://fb.com/user5.jpg",
        "like_count": 2,
        "profile_url": "https://fb.com/user5",
        "comment_count": 0,
        "is_liked": false
      }
    ],
    "pagination": "nested_cursor_2"
  }
}

Response (Instagram)

{
  "status": "SUCCESS",
  "http_code": 200,
  "message": "Fetched next nested comments successfully",
  "data": {
    "nested_comments": [
      {
        "id": "reply_004",
        "username": "insta_user5",
        "profile_url": "https://ig.com/user5",
        "create_time": "2025-08-23T06:16:00Z",
        "text": "Super cool!",
        "like_count": 3,
        "is_liked": false,
        "comment_count": 0
      }
    ],
    "pagination": "nested_cursor_2"
  }
}

Response (YouTube)

{
  "status": "SUCCESS",
  "http_code": 200,
  "message": "Fetched next nested comments successfully",
  "data": {
    "nested_comments": [
      {
        "id": "reply_005",
        "username": "yt_user3",
        "user_id": "yt_user_003",
        "created_time": "2025-08-23T06:16:00Z",
        "text": "Great discussion!",
        "image_url": "https://yt.com/user3.jpg",
        "like_count": 1,
        "profile_url": "https://yt.com/channel/user3",
        "comment_count": 0,
        "is_liked": false
      }
    ],
    "pagination": "nested_page_token_2"
  }
}

Response (LinkedIn)

{
  "status": "SUCCESS",
  "http_code": 200,
  "message": "Fetched next nested comments successfully",
  "data": {
    "nested_comments": [
      {
        "id": "reply_006",
        "user_name": "user7",
        "user_channel_url": "https://linkedin.com/in/user7",
        "text": "Excellent point!",
        "like_count": 1,
        "created_time": "2025-08-23T06:16:00Z",
        "profile_pic": "https://linkedin.com/user7.jpg"
      }
    ],
    "pagination": "nested_cursor_2"
  }
}

Error Response

{
  "status": "FAILURE",
  "http_code": 400,
  "message": "comment_id is required",
  "data": ""
}