Brand2Social API Documentation

Comprehensive guide to Brand2Social API endpoints

Get All Calendar Posts

Retrieve all scheduled social media posts for a brand within a specified date range.

Use this API to fetch posts created via create-new-post for platforms like Facebook, Instagram, LinkedIn, Twitter, YouTube, Google Business, TikTok, and Pinterest. The response includes post details, status, and connected profile information. The schedule_post_id can be used with update-new-post or delete-new-post. Requires brand_id and valid date range (from, to).

  • Method: POST
  • Endpoint: /api/api-services/v1/brand-service/get-all-calendar-post
  • Returns: List of scheduled posts with details

Get All Calendar Posts

POST https://app.brand2social.com/api/api-services/v1/brand-service/get-all-calendar-post

FieldTypeRequiredDescription
Authorizationstring (header)YesBearer token for authentication
brand_idint64 (query)YesID of the brand
fromstring (query, ISO 8601)YesStart of the date range (e.g., "2025-08-01T00:00:00.000Z")
tostring (query, ISO 8601)YesEnd of the date range (e.g., "2025-08-31T23:59:59.999Z")
sort_bystring (query)NoField to sort by (e.g., "scheduled_time")
sort_orderstring (query)NoSort direction (e.g., "asc", "desc")
    
    
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/get-all-calendar-post?brand_id=123&from=2025-08-01T00:00:00.000Z&to=2025-08-31T23:59:59.999Z&sort_by=scheduled_time&sort_order=asc' \
  --header 'Authorization: Bearer B2S_dummyToken'
    
  

Response

{
  "status": "SUCCESS",
  "http_code": 200,
  "message": "",
  "data": [
    {
      "id": 456,
      "created_by": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "profile_pic": "https://example.com/profile.jpg"
      },
      "title": "Product Launch Post",
      "description": "Announcing our new product!",
      "is_file_upload": true,
      "scheduled_time": "2025-08-20T14:30:00.000Z",
      "updated_at": "2025-08-19T15:00:00.000Z",
      "status": "SCHEDULED",
      "media_url": "https://example.com/media.jpg",
      "is_enabled": true,
      "is_approved": true,
      "is_rejected": false,
      "has_edit_access": true,
      "has_delete_access": true,
      "has_approve_access": false,
      "approved_by": {
        "name": "Jane Smith",
        "email": "jane.smith@example.com",
        "profile_pic": "https://example.com/jane.jpg"
      },
      "rejected_by": {
        "name": "",
        "email": "",
        "profile_pic": ""
      },
      "created_time": "2025-08-18T10:00:00.000Z",
      "status_code": 1,
      "connected_profile_details": [
        {
          "connected_profile_id": 98765,
          "profile_id": "fb_12345",
          "connected_profile_image": "https://example.com/fb_profile.jpg",
          "connected_profile_name": "Brand Page",
          "social_media": "facebook",
          "webhook_profile_id": 1001
        },
        {
          "connected_profile_id": 98766,
          "profile_id": "insta_67890",
          "connected_profile_image": "https://example.com/insta_profile.jpg",
          "connected_profile_name": "Brand Insta",
          "social_media": "instagram",
          "webhook_profile_id": 1002
        }
      ]
    }
  ]
}

Response Fields

FieldTypeDescription
idint64Unique ID of the scheduled post (use with update-new-post or delete-new-post)
created_byobjectUser who created the post
FieldTypeDescription
namestringName of the user
emailstringEmail of the user
profile_picstringURL of the user’s profile picture
titlestringTitle of the post
descriptionstringContent of the post
is_file_uploadbooleanWhether the post includes uploaded media
scheduled_timestring (ISO 8601)Scheduled time of the post
updated_atstring (ISO 8601)Last update time of the post
statusstringPost status (e.g., "SCHEDULED", "POSTED", "FAILED")
media_urlstringURL of the media associated with the post
is_enabledbooleanWhether the post is enabled
is_approvedbooleanWhether the post is approved
is_rejectedbooleanWhether the post is rejected
has_edit_accessbooleanWhether the user has edit access
has_delete_accessbooleanWhether the user has delete access
has_approve_accessbooleanWhether the user has approval access
approved_byobjectUser who approved the post (empty if not approved)
FieldTypeDescription
namestringName of the approver
emailstringEmail of the approver
profile_picstringURL of the approver’s profile picture
rejected_byobjectUser who rejected the post (empty if not rejected)
FieldTypeDescription
namestringName of the rejector
emailstringEmail of the rejector
profile_picstringURL of the rejector’s profile picture
created_timestringCreation time of the post
status_codeint64Numeric code for post status
connected_profile_detailsarray of objectsDetails of connected social media profiles
FieldTypeDescription
connected_profile_idint64ID of the connected profile (from integrate-accounts)
profile_idstringSocial media profile ID
connected_profile_imagestringURL of the profile image
connected_profile_namestringName of the profile
social_mediastringPlatform (e.g., "facebook", "instagram")
webhook_profile_idint64Webhook profile ID

Error Response

{
  "status": "FAILURE",
  "http_code": 400,
  "message": "Error in fetching calendar events",
  "data": ""
}