Create Posts
Create or schedule social media posts across connected channels (e.g., Facebook, YouTube, Twitter/X). Supports immediate and scheduled publishing, media attachments, hashtags, YouTube-specific metadata, and Twitter threads.
Method: POST
URL: https://app.marketingblocks.ai/api/v1/social-sparks/create-post
Permission: social-create-post
Headers:
Authorization: Bearer <token>
Content-Type: application/jsonParameters
channel_type
string
required
Type of social channel (e.g., facebook, twitter, youtube).
channel_id
integer
required
Unique identifier of the user’s connected account.
post_type
string
required
Type of post (e.g., post, reel, story, tweet, thread).
caption_text
string
required
Main text content of the post.
media_urls
array[string]
required
URLs to media (images/videos) to include in the post.
publish_mode
string
required
When to publish: now, scheduled, queued, share_next.
schedule_time
string
required if publish_mode=scheduled
Scheduled datetime in Y-m-d H:i format (e.g., 2025-08-01 14:30).
time_zone
string
required if publish_mode=scheduled
Timezone used to interpret schedule_time (e.g., Africa/Lagos).
hash_tags
string
optional
Comma- or space-separated string of hashtags.
twitter_threads
array[object]
required if post_type=thread
Thread items for Twitter/X. See structure below.
post_extra
object
required if channel_type=youtube
Extra fields for YouTube posts (e.g., title, category, privacy). See structure below.
twitter_threads item
twitter_threads item{
"message": "Tweet text",
"media_urls": ["https://.../media.jpg"]
}message(string, required) — Tweet textmedia_urls(array[string], optional) — Media for that tweet
post_extra (YouTube)
post_extra (YouTube){
"title": "Title of the post",
"category": 22,
"privacyStatus": "public"
}title(string, required)category(integer, optional) — YouTube category IDprivacyStatus(string, optional) —public,private, orunlisted
Example Request Bodies
Basic (Facebook, Scheduled)
{
"channel_type": "facebook",
"channel_id": 254,
"post_type": "post",
"caption_text": "This is a scheduled post.",
"media_urls": ["https://videos.pexels.com/video-files/8382685/8382685-uhd_1440_2732_25fps.mp4"],
"publish_mode": "scheduled",
"schedule_time": "2025-08-01 14:30",
"time_zone": "Africa/Lagos",
"hash_tags": "#socialsparks #facebook #bettercoding"
}YouTube (+ post_extra)
post_extra){
"channel_type": "youtube",
"channel_id": 321,
"post_type": "post",
"caption_text": "Check out my new video!",
"media_urls": ["https://videos.pexels.com/video-files/8382685/8382685-uhd_1440_2732_25fps.mp4"],
"publish_mode": "now",
"post_extra": {
"title": "Title of the post",
"category": 22,
"privacyStatus": "public"
}
}Twitter Thread
{
"channel_type": "twitter",
"channel_id": 443,
"post_type": "thread",
"publish_mode": "now",
"twitter_threads": [
{
"message": "First tweet in thread.",
"media_urls": [
"https://videos.pexels.com/video-files/8382685/8382685-uhd_1440_2732_25fps.mp4"
]
},
{
"message": "Second tweet in thread.",
"media_urls": [
"https://marketingblocks.s3.amazonaws.com/public/media/image1.jpeg"
]
}
],
"hash_tags": "#socialsparks #twitter #threading"
}Example Response
{
"message": "Post created successfully.",
"data": {
"post_id": 12345,
"STATUS": "queued"
},
"status": true
}cURL
curl --location 'https://app.marketingblocks.ai/api/v1/social-sparks/create-post' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"channel_type": "facebook",
"channel_id": 254,
"post_type": "post",
"caption_text": "This is a scheduled post.",
"media_urls": ["https://videos.pexels.com/video-files/8382685/8382685-uhd_1440_2732_25fps.mp4"],
"publish_mode": "scheduled",
"schedule_time": "2025-08-01 14:30",
"time_zone": "Africa/Lagos",
"hash_tags": "#socialsparks #facebook #bettercoding"
}'Notes
Always send the body as raw JSON.
Use a valid
channel_idfor the chosenchannel_type.For scheduled posts, both
schedule_timeandtime_zoneare required.
Last updated