Create New Post
Create a new social media post for one or more platforms (e.g., Facebook, Instagram, LinkedIn, Twitter, YouTube, Google Business, TikTok, Pinterest) for a specific brand.
Use this API after uploading media via upload-media
to obtain media_ids
and integrating accounts via integrate-accounts
to get connected_profile_id
. Supports scheduling and approval workflows. Each platform has specific validation rules for post_type
and media constraints (e.g., max image count, video length).
- Method: POST
- Endpoint:
/api/api-services/v1/brand-service/create-new-post
- Returns: Confirmation of post creation or scheduling
Create New Post
POST https://app.brand2social.com/api/api-services/v1/brand-service/create-new-post
Field | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Authorization | string (header) | Yes | Bearer token for authentication | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
brand_id | int64 | Yes | ID of the brand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
new_post_data | object | Yes | Details of the post to be created | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/create-new-post' \
--header 'Authorization: Bearer B2S_dummyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"brand_id": 123,
"new_post_data": {
"scheduled_event_requests_data": {
"facebook_requests_data": [
{
"connected_profile_id": 98765,
"media_ids": ["encrypted_media_id_1"],
"description": "Check out our new product!",
"link": "https://example.com/product",
"post_type": "post",
"has_comment": true,
"comment_description": "Tell us what you think!",
"thumbnail": "https://example.com/thumbnail.jpg"
}
],
"instagram_requests_data": [
{
"connected_profile_id": 98766,
"media_ids": ["encrypted_media_id_2"],
"cover_url": "https://example.com/cover.jpg",
"description": "New product launch!",
"post_type": "reels",
"has_comment": false,
"post_on_my_wall": true
}
],
"twitter_requests_data": [
{
"connected_profile_id": 98767,
"media_ids": ["encrypted_media_id_3"],
"description": "Exciting news! #ProductLaunch",
"post_type": "post"
}
],
"youtube_requests_data": [
{
"connected_profile_id": 98768,
"media_ids": ["encrypted_media_id_4"],
"description": "Watch our new product video!",
"post_type": "video",
"title": "Product Launch Video",
"privacy": "public",
"has_comment": false,
"thumbnail": "https://example.com/thumbnail.jpg"
}
],
"linkedin_requests_data": [
{
"connected_profile_id": 98769,
"media_ids": ["encrypted_media_id_5"],
"description": "Announcing our latest product!",
"post_type": "post",
"title": "New Product Announcement",
"has_comment": false
}
],
"gbusiness_requests_data": [
{
"connected_profile_id": 98770,
"media_ids": ["encrypted_media_id_6"],
"description": "Visit our store for the new product!",
"post_type": "STANDARD",
"title": "New Product Available",
"button_type": "CALL",
"url": "https://example.com/store"
}
],
"tiktok_requests_data": [
{
"connected_profile_id": 98771,
"media_ids": ["encrypted_media_id_7"],
"description": "Check out our latest video! #NewProduct",
"title": "Product Launch",
"privacy": "public",
"post_type": "DIRECT_POST",
"allow_user_to_comment": true,
"allow_user_to_duet": false,
"allow_user_to_switch": false,
"disclosure_content": false,
"your_brand": true,
"branded_content": false
}
],
"pinterest_requests_data": [
{
"connected_profile_id": 98772,
"media_ids": ["encrypted_media_id_8"],
"title": "New Product Pin",
"description": "Discover our latest product!",
"link": "https://example.com/product",
"cover_image_url": "https://example.com/cover.jpg",
"post_type": "post",
"board_name": "Product Board"
}
]
},
"scheduled_time": "2025-08-20T14:30:00Z",
"is_scheduled_post": true,
"needs_approval": false
}
}'
Response
{
"status": "SUCCESS",
"http_code": 200,
"message": "Post created successfully",
"data": ""
}
Error Response
{
"status": "FAILURE",
"http_code": 400,
"message": "Validation errors",
"data": [
"Facebook post: Multiple videos not allowed",
"Instagram reels: Invalid aspect ratio",
"Twitter post: Description exceeds max length"
]
}