Authentication
All API requests require authentication using your RecurPost account credentials. You must include these parameters in every request.
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Your RecurPost account email address |
| pass_key | string Required |
Your API Password Key
Important: This is NOT your login password. Generate your API key from Account Settings in your RecurPost dashboard.
|
Request Format
All API endpoints accept POST requests with JSON body.
| Property | Value |
|---|---|
| Method | POST |
| Content-Type | application/json |
| Base URL | https://social.recurpost.com |
curl -X POST "https://social.recurpost.com/api/user_login" \
-H "Content-Type: application/json" \
-d '{
"emailid": "your@email.com",
"pass_key": "your_api_key_here"
}'
Response Codes
The API uses standard HTTP response codes to indicate success or failure.
| Code | Status | Description |
|---|---|---|
| 200 | Success | Request completed successfully |
| 400 | Validation Error | Missing or invalid parameters. Check the required fields. |
| 401 | Authentication Error | Invalid email or pass_key. Verify your credentials. |
| 405 | Method Not Allowed | Use POST method for all requests. |
| 415 | Schedule Time Error | Invalid or past datetime for scheduled posts. |
API Endpoints
User Login
Verify your API credentials and test authentication.
/api/user_login
Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user (found in Account Settings) |
Code Examples
curl -X POST https://social.recurpost.com/api/user_login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "emailid=your@email.com" \
-d "pass_key=your_api_key"
fetch('https://social.recurpost.com/api/user_login', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
emailid: 'your@email.com',
pass_key: 'your_api_key'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://social.recurpost.com/api/user_login',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key'
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
import requests
url = 'https://social.recurpost.com/api/user_login'
data = {
'emailid': 'your@email.com',
'pass_key': 'your_api_key'
}
response = requests.post(url, data=data)
print(response.json())
Library List
Get all content libraries in your account. Returns library IDs needed for adding recurring content.
/api/library_list
Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user |
/api/add_content_in_library endpoint.
Code Examples
curl -X POST https://social.recurpost.com/api/library_list \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "emailid=your@email.com" \
-d "pass_key=your_api_key"
fetch('https://social.recurpost.com/api/library_list', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
emailid: 'your@email.com',
pass_key: 'your_api_key'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://social.recurpost.com/api/library_list',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key'
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
import requests
url = 'https://social.recurpost.com/api/library_list'
data = {
'emailid': 'your@email.com',
'pass_key': 'your_api_key'
}
response = requests.post(url, data=data)
print(response.json())
History Data
Get posting history for a specific social account. Returns up to 100 posts per request. The response includes a total_posts field with the total count of posts matching the date range.
start_date and end_date are not provided, the API returns data from the last 30 minutes. On subsequent requests (without date filters), it returns data from the last fetched time to the current time.
/api/history_data
Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user |
| id | string Required | Social account ID (from /api/social_account_list) |
| start_date | string Optional |
Start date for filtering history
Format:
Y-m-d H:i:s (e.g., 2026-03-01 00:00:00)Default: Last 30 minutes (or last fetched time on subsequent requests)
|
| end_date | string Optional |
End date for filtering history
Format:
Y-m-d H:i:s (e.g., 2026-03-23 23:59:59)Default: Current time
|
| is_get_video_updates | boolean Optional |
Include video posts in response
Values:
true falseDefault:
true |
Response
| Field | Type | Description |
|---|---|---|
| total_posts | integer | Total count of posts between the start and end date |
| data | array | Array of post history records (max 100 per request) |
Code Examples
curl -X POST https://social.recurpost.com/api/history_data \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "emailid=your@email.com" \
-d "pass_key=your_api_key" \
-d "id=social_account_id" \
-d "is_get_video_updates=true" \
# Optional date filters (Format: Y-m-d H:i:s)
-d "start_date=2026-03-01 00:00:00" \
-d "end_date=2026-03-23 23:59:59"
fetch('https://social.recurpost.com/api/history_data', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
emailid: 'your@email.com',
pass_key: 'your_api_key',
id: 'social_account_id',
is_get_video_updates: 'true',
// Optional date filters (Format: Y-m-d H:i:s)
start_date: '2026-03-01 00:00:00',
end_date: '2026-03-23 23:59:59'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://social.recurpost.com/api/history_data',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query([
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key',
'id' => 'social_account_id',
'is_get_video_updates' => 'true',
// Optional date filters (Format: Y-m-d H:i:s)
'start_date' => '2026-03-01 00:00:00',
'end_date' => '2026-03-23 23:59:59'
])
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
import requests
url = 'https://social.recurpost.com/api/history_data'
data = {
'emailid': 'your@email.com',
'pass_key': 'your_api_key',
'id': 'social_account_id',
'is_get_video_updates': 'true',
# Optional date filters (Format: Y-m-d H:i:s)
'start_date': '2026-03-01 00:00:00',
'end_date': '2026-03-23 23:59:59'
}
response = requests.post(url, data=data)
print(response.json())
Add Content to Library
Add posts to a content library for recurring posting. Content in libraries will be automatically posted according to your schedule.
/api/add_content_in_library
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user |
| id | string Required | Library ID (from /api/library_list) |
| message | string Required | Default message/content for the post |
Media Parameters
| Parameter | Type | Description |
|---|---|---|
| image_url | array Optional |
Array of image URLs. Images must be publicly accessible.
Important: Must be an array, not a string!
Correct:
["https://example.com/img1.jpg", "https://example.com/img2.jpg"]Wrong: "https://example.com/img.jpg"
|
| video_url | string Optional | Video URL. Must be publicly accessible. |
| url | string Optional | Website URL to share with the post |
| host_images_on_recurpost | boolean Optional |
Copy images to RecurPost servers for reliability
Values:
true falseDefault:
true |
Platform-Specific Messages
Customize your message for each platform. Leave blank to use the default message.
| Parameter | Platform | Type |
|---|---|---|
| fb_message | string | |
| tw_message | Twitter/X | string |
| ln_message | string | |
| in_message | string | |
| gmb_message | Google Business | string |
| pi_message | string | |
| yt_message | YouTube | string |
| tk_message | TikTok | string |
| th_message | Threads | string |
| bs_message | Bluesky | string |
Post Type Options
| Parameter | Type | Description |
|---|---|---|
| fb_post_type | string Optional |
Facebook Post type
Values:
feed story reelDefault:
feed |
| in_post_type | string Optional |
Instagram Post type
Values:
feed story reelDefault:
feed |
| in_reel_share_in_feed | string Optional |
Share Instagram Reel to Feed also (only when in_post_type is reel)
Values:
yes noDefault:
yes |
First Comment (Hashtags)
Add a first comment to your posts, commonly used for hashtags on Instagram.
| Parameter | Type | Description |
|---|---|---|
| first_comment | string Optional |
Default first comment for all supported platforms
Facebook Pages
LinkedIn
Instagram Feed
|
| fb_first_comment | string Optional | Facebook specific first comment |
| ln_first_comment | string Optional | LinkedIn specific first comment |
| in_first_comment | string Optional | Instagram specific first comment (Feed only) |
LinkedIn Document (Carousel)
| Parameter | Type | Description |
|---|---|---|
| ln_document | string Optional |
Document URL for LinkedIn carousel
Supported formats: PPT, PDF, DOCX
|
| ln_document_title | string Optional | Title for the LinkedIn document |
Pinterest Options
| Parameter | Type | Description |
|---|---|---|
| pi_title | string Optional | Pinterest pin title |
Google Business Profile Options
| Parameter | Type | Description |
|---|---|---|
| gbp_cta | string Optional |
Call To Action button type
Values:
None Learn more Sign up Buy Order online Book Call now OfferDefault:
None |
| gbp_cta_url | string Optional | CTA link URL (not used for "Call now" or "Offer") |
| gbp_offer_title | string Optional | Offer title (when CTA is "Offer") |
| gbp_offer_start_date | string Optional | Offer start date. Format: 2023-06-23 18:20:22 |
| gbp_offer_end_date | string Optional | Offer end date. Format: 2023-06-25 18:20:22 |
| gbp_offer_coupon_code | string Optional | Coupon code for the offer |
| gbp_offer_terms | string Optional | Terms and conditions |
| gbp_redeem_offer_link | string Optional | URL to redeem the offer |
YouTube Options
| Parameter | Type | Description |
|---|---|---|
| yt_title | string Optional | Video title |
| yt_category | string Optional |
Video category
Values:
Film & Animation Autos & Vehicles Music Pets & Animals Sports Travel & Events Gaming People & Blogs Comedy Entertainment News & Politics Howto & Style Education Science & Technology Nonprofits & ActivismDefault:
Entertainment |
| yt_privacy_status | string Optional |
Video privacy setting
Values:
Public Private UnlistedDefault:
Public |
| yt_user_tags | string Optional | Video tags (comma-separated) |
| yt_thumb | string Optional | Custom thumbnail URL |
| yt_video_made_for_kids | string Optional |
Made for kids designation
Values:
yes noDefault:
yes |
TikTok Options
| Parameter | Type | Description |
|---|---|---|
| tk_privacy_status | string Optional |
Video privacy setting
Values:
Public to Everyone Mutual Follow Friends Self OnlyDefault:
Public to Everyone |
| tk_allow_comments | string Optional |
Allow comments
Values:
yes noDefault:
yes |
| tk_allow_duet | string Optional |
Allow duets
Values:
yes noDefault:
yes |
| tk_allow_stitches | string Optional |
Allow stitches
Values:
yes noDefault:
yes |
Queue & Scheduling Options
| Parameter | Type | Description |
|---|---|---|
| is_top_of_queue | integer Optional |
Move post to top of queue (posts next on all selected social accounts)
Values:
0 (normal) 1 (top of queue)Default:
0 |
| content_livedate | string Optional |
Keep as draft until this date
Format:
YYYY-MM-DD (e.g., 2023-06-23)Leave blank to save as active post
|
| content_expiredate | string Optional |
Stop recurring after this date
Format:
YYYY-MM-DD (e.g., 2023-06-23)Leave blank for content that never expires
|
Code Examples
curl -X POST https://social.recurpost.com/api/add_content_in_library \
-H "Content-Type: application/x-www-form-urlencoded" \
# Required parameters
-d "emailid=your@email.com" \
-d "pass_key=your_api_key" \
-d "id=library_id_here" \
-d "message=Check out our latest product! Link in bio." \
# Media parameters
-d "url=https://yourwebsite.com/product" \
-d "image_url[]=https://example.com/image1.jpg" \
-d "image_url[]=https://example.com/image2.jpg" \
-d "video_url=https://example.com/video.mp4" \
-d "host_images_on_recurpost=true" \
# Platform-specific messages
-d "fb_message=Check out our latest product! #facebook #newproduct" \
-d "tw_message=New product alert! Check it out now." \
-d "ln_message=Excited to share our latest product with you!" \
-d "in_message=Check out our latest product!" \
-d "gmb_message=Visit us to see our new product!" \
-d "pi_message=Discover our newest product" \
-d "yt_message=Watch our product showcase video" \
-d "tk_message=New product drop!" \
-d "th_message=Check out what's new!" \
-d "bs_message=Our latest product is here!" \
# Post type options
-d "fb_post_type=feed" \
-d "in_post_type=feed" \
-d "in_reel_share_in_feed=yes" \
# First comments
-d "first_comment=#newproduct #launch #shopping" \
-d "fb_first_comment=#facebook #newproduct" \
-d "ln_first_comment=#linkedin #business" \
-d "in_first_comment=#instagram #socialmedia #marketing" \
# LinkedIn options
-d "ln_document=https://example.com/brochure.pdf" \
-d "ln_document_title=Product Brochure 2024" \
# Pinterest options
-d "pi_title=Amazing New Product - Must Have!" \
# Google Business Profile options
-d "gbp_cta=Learn more" \
-d "gbp_cta_url=https://yourwebsite.com/product" \
# YouTube options
-d "yt_title=New Product Showcase" \
-d "yt_category=Howto & Style" \
-d "yt_privacy_status=Public" \
-d "yt_user_tags=product, new, launch, shopping" \
-d "yt_thumb=https://example.com/thumbnail.jpg" \
-d "yt_video_made_for_kids=no" \
# TikTok options
-d "tk_privacy_status=Public to Everyone" \
-d "tk_allow_comments=yes" \
-d "tk_allow_duet=yes" \
-d "tk_allow_stitches=yes" \
# Queue & scheduling
-d "is_top_of_queue=0" \
-d "content_livedate=2024-06-01" \
-d "content_expiredate=2024-12-31"
const formData = new FormData();
// Required parameters
formData.append('emailid', 'your@email.com');
formData.append('pass_key', 'your_api_key');
formData.append('id', 'library_id_here');
formData.append('message', 'Check out our latest product! Link in bio.');
// Media parameters
formData.append('url', 'https://yourwebsite.com/product');
formData.append('image_url', JSON.stringify(['https://example.com/image1.jpg', 'https://example.com/image2.jpg']));
formData.append('video_url', 'https://example.com/video.mp4');
formData.append('host_images_on_recurpost', 'true');
// Platform-specific messages
formData.append('fb_message', 'Check out our latest product! #facebook #newproduct');
formData.append('tw_message', 'New product alert! Check it out now.');
formData.append('ln_message', 'Excited to share our latest product with you!');
formData.append('in_message', 'Check out our latest product!');
formData.append('gmb_message', 'Visit us to see our new product!');
formData.append('pi_message', 'Discover our newest product');
formData.append('yt_message', 'Watch our product showcase video');
formData.append('tk_message', 'New product drop!');
formData.append('th_message', 'Check out what\'s new!');
formData.append('bs_message', 'Our latest product is here!');
// Post type options
formData.append('fb_post_type', 'feed'); // feed, reels, story
formData.append('in_post_type', 'feed'); // feed, reels, story
formData.append('in_reel_share_in_feed', 'yes');
// First comments
formData.append('first_comment', '#newproduct #launch #shopping');
formData.append('fb_first_comment', '#facebook #newproduct');
formData.append('ln_first_comment', '#linkedin #business');
formData.append('in_first_comment', '#instagram #socialmedia #marketing');
// LinkedIn options
formData.append('ln_document', 'https://example.com/brochure.pdf');
formData.append('ln_document_title', 'Product Brochure 2024');
// Pinterest options
formData.append('pi_title', 'Amazing New Product - Must Have!');
// Google Business Profile options
formData.append('gbp_cta', 'Learn more');
formData.append('gbp_cta_url', 'https://yourwebsite.com/product');
// YouTube options
formData.append('yt_title', 'New Product Showcase');
formData.append('yt_category', 'Howto & Style');
formData.append('yt_privacy_status', 'Public');
formData.append('yt_user_tags', 'product, new, launch, shopping');
formData.append('yt_thumb', 'https://example.com/thumbnail.jpg');
formData.append('yt_video_made_for_kids', 'no');
// TikTok options
formData.append('tk_privacy_status', 'Public to Everyone');
formData.append('tk_allow_comments', 'yes');
formData.append('tk_allow_duet', 'yes');
formData.append('tk_allow_stitches', 'yes');
// Queue & scheduling
formData.append('is_top_of_queue', '0');
formData.append('content_livedate', '2024-06-01');
formData.append('content_expiredate', '2024-12-31');
fetch('https://social.recurpost.com/api/add_content_in_library', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$ch = curl_init();
$data = [
// Required parameters
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key',
'id' => 'library_id_here',
'message' => 'Check out our latest product! Link in bio.',
// Media parameters
'url' => 'https://yourwebsite.com/product',
'image_url' => ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
'video_url' => 'https://example.com/video.mp4',
'host_images_on_recurpost' => 'true',
// Platform-specific messages
'fb_message' => 'Check out our latest product! #facebook #newproduct',
'tw_message' => 'New product alert! Check it out now.',
'ln_message' => 'Excited to share our latest product with you!',
'in_message' => 'Check out our latest product!',
'gmb_message' => 'Visit us to see our new product!',
'pi_message' => 'Discover our newest product',
'yt_message' => 'Watch our product showcase video',
'tk_message' => 'New product drop!',
'th_message' => 'Check out what\'s new!',
'bs_message' => 'Our latest product is here!',
// Post type options
'fb_post_type' => 'feed', // feed, reels, story
'in_post_type' => 'feed', // feed, reels, story
'in_reel_share_in_feed' => 'yes',
// First comments
'first_comment' => '#newproduct #launch #shopping',
'fb_first_comment' => '#facebook #newproduct',
'ln_first_comment' => '#linkedin #business',
'in_first_comment' => '#instagram #socialmedia #marketing',
// LinkedIn options
'ln_document' => 'https://example.com/brochure.pdf',
'ln_document_title' => 'Product Brochure 2024',
// Pinterest options
'pi_title' => 'Amazing New Product - Must Have!',
// Google Business Profile options
'gbp_cta' => 'Learn more',
'gbp_cta_url' => 'https://yourwebsite.com/product',
// YouTube options
'yt_title' => 'New Product Showcase',
'yt_category' => 'Howto & Style',
'yt_privacy_status' => 'Public',
'yt_user_tags' => 'product, new, launch, shopping',
'yt_thumb' => 'https://example.com/thumbnail.jpg',
'yt_video_made_for_kids' => 'no',
// TikTok options
'tk_privacy_status' => 'Public to Everyone',
'tk_allow_comments' => 'yes',
'tk_allow_duet' => 'yes',
'tk_allow_stitches' => 'yes',
// Queue & scheduling
'is_top_of_queue' => 0,
'content_livedate' => '2024-06-01',
'content_expiredate' => '2024-12-31'
];
curl_setopt_array($ch, [
CURLOPT_URL => 'https://social.recurpost.com/api/add_content_in_library',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data)
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
?>
import requests
import json
url = 'https://social.recurpost.com/api/add_content_in_library'
data = {
# Required parameters
'emailid': 'your@email.com',
'pass_key': 'your_api_key',
'id': 'library_id_here',
'message': 'Check out our latest product! Link in bio.',
# Media parameters
'url': 'https://yourwebsite.com/product',
'image_url': json.dumps(['https://example.com/image1.jpg', 'https://example.com/image2.jpg']),
'video_url': 'https://example.com/video.mp4',
'host_images_on_recurpost': 'true',
# Platform-specific messages
'fb_message': 'Check out our latest product! #facebook #newproduct',
'tw_message': 'New product alert! Check it out now.',
'ln_message': 'Excited to share our latest product with you!',
'in_message': 'Check out our latest product!',
'gmb_message': 'Visit us to see our new product!',
'pi_message': 'Discover our newest product',
'yt_message': 'Watch our product showcase video',
'tk_message': 'New product drop!',
'th_message': "Check out what's new!",
'bs_message': 'Our latest product is here!',
# Post type options
'fb_post_type': 'feed', # feed, reels, story
'in_post_type': 'feed', # feed, reels, story
'in_reel_share_in_feed': 'yes',
# First comments
'first_comment': '#newproduct #launch #shopping',
'fb_first_comment': '#facebook #newproduct',
'ln_first_comment': '#linkedin #business',
'in_first_comment': '#instagram #socialmedia #marketing',
# LinkedIn options
'ln_document': 'https://example.com/brochure.pdf',
'ln_document_title': 'Product Brochure 2024',
# Pinterest options
'pi_title': 'Amazing New Product - Must Have!',
# Google Business Profile options
'gbp_cta': 'Learn more',
'gbp_cta_url': 'https://yourwebsite.com/product',
# YouTube options
'yt_title': 'New Product Showcase',
'yt_category': 'Howto & Style',
'yt_privacy_status': 'Public',
'yt_user_tags': 'product, new, launch, shopping',
'yt_thumb': 'https://example.com/thumbnail.jpg',
'yt_video_made_for_kids': 'no',
# TikTok options
'tk_privacy_status': 'Public to Everyone',
'tk_allow_comments': 'yes',
'tk_allow_duet': 'yes',
'tk_allow_stitches': 'yes',
# Queue & scheduling
'is_top_of_queue': 0,
'content_livedate': '2024-06-01',
'content_expiredate': '2024-12-31'
}
response = requests.post(url, data=data)
print(response.json())
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"id": "library_id_here",
"message": "Check out our latest product! Link in bio.",
"fb_message": "Check out our latest product! #facebook #newproduct",
"tw_message": "New product alert! Check it out now.",
"ln_message": "Excited to share our latest product with you!",
"in_message": "Check out our latest product!",
"gmb_message": "Visit us to see our new product!",
"pi_message": "Discover our newest product",
"yt_message": "Watch our product showcase video",
"tk_message": "New product drop!",
"th_message": "Check out what's new!",
"bs_message": "Our latest product is here!",
"url": "https://yourwebsite.com/product",
"image_url": ["https://example.com/product1.jpg", "https://example.com/product2.jpg"],
"video_url": "https://example.com/product-video.mp4",
"fb_post_type": "feed",
"in_post_type": "feed",
"in_reel_share_in_feed": "yes",
"first_comment": "#newproduct #launch #shopping",
"fb_first_comment": "#facebook #newproduct #shopping",
"ln_first_comment": "#linkedin #business #newproduct",
"in_first_comment": "#instagram #socialmedia #marketing #newproduct",
"ln_document": "https://example.com/product-brochure.pdf",
"ln_document_title": "Product Brochure 2024",
"pi_title": "Amazing New Product - Must Have!",
"gbp_cta": "Learn more",
"gbp_cta_url": "https://yourwebsite.com/product",
"yt_title": "New Product Showcase",
"yt_category": "Howto & Style",
"yt_privacy_status": "Public",
"yt_user_tags": "product, new, launch, shopping",
"yt_thumb": "https://example.com/video-thumbnail.jpg",
"yt_video_made_for_kids": "no",
"tk_privacy_status": "Public to Everyone",
"tk_allow_comments": "yes",
"tk_allow_duet": "yes",
"tk_allow_stitches": "yes",
"is_top_of_queue": 0,
"host_images_on_recurpost": "true",
"content_livedate": "2024-06-01",
"content_expiredate": "2024-12-31"
}
Post Content
Post content directly to social accounts. Can be posted immediately (one-off) or scheduled for a future time.
/api/post_content
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user |
| id | string Required | Social account ID (from /api/social_account_list) |
| message | string Required | Message/content for the post |
Scheduling Parameter
| Parameter | Type | Description |
|---|---|---|
| schedule_date_time | string Optional |
Schedule post for future time
Format:
YYYY-MM-DD HH:MM:SS (e.g., 2023-06-23 15:30:00)Leave blank to post immediately
Note: Time must be in the future. Past times will return error code 415.
|
Media Parameters
| Parameter | Type | Description |
|---|---|---|
| image_url | array Optional |
Array of image URLs. Images must be publicly accessible.
Important: Must be an array, not a string!
Correct:
["https://example.com/img1.jpg", "https://example.com/img2.jpg"]Wrong: "https://example.com/img.jpg"
|
| video_url | string Optional | Video URL. Must be publicly accessible. |
| url | string Optional | Website URL to share with the post |
| host_images_on_recurpost | boolean Optional |
Copy images to RecurPost servers for reliability
Values:
true falseDefault:
true |
Platform-Specific Messages
Customize your message for each platform. Leave blank to use the default message.
| Parameter | Platform | Type |
|---|---|---|
| fb_message | string | |
| tw_message | Twitter/X | string |
| ln_message | string | |
| in_message | string | |
| gmb_message | Google Business | string |
| pi_message | string | |
| yt_message | YouTube | string |
| tk_message | TikTok | string |
| th_message | Threads | string |
| bs_message | Bluesky | string |
Post Type Options
| Parameter | Type | Description |
|---|---|---|
| fb_post_type | string Optional |
Facebook Post type
Values:
feed story reelDefault:
feed |
| in_post_type | string Optional |
Instagram Post type
Values:
feed story reelDefault:
feed |
| in_reel_share_in_feed | string Optional |
Share Instagram Reel to Feed also (only when in_post_type is reel)
Values:
yes noDefault:
yes |
First Comment (Hashtags)
Add a first comment to your posts, commonly used for hashtags on Instagram.
| Parameter | Type | Description |
|---|---|---|
| first_comment | string Optional |
Default first comment for all supported platforms
Facebook Pages
LinkedIn
Instagram Feed
|
| fb_first_comment | string Optional | Facebook specific first comment |
| ln_first_comment | string Optional | LinkedIn specific first comment |
| in_first_comment | string Optional | Instagram specific first comment (Feed only) |
LinkedIn Document (Carousel)
| Parameter | Type | Description |
|---|---|---|
| ln_document | string Optional |
Document URL for LinkedIn carousel
Supported formats: PPT, PDF, DOCX
|
| ln_document_title | string Optional | Title for the LinkedIn document |
Pinterest Options
| Parameter | Type | Description |
|---|---|---|
| pi_title | string Optional | Pinterest pin title |
Google Business Profile Options
| Parameter | Type | Description |
|---|---|---|
| gbp_cta | string Optional |
Call To Action button type
Values:
None Learn more Sign up Buy Order online Book Call now OfferDefault:
None |
| gbp_cta_url | string Optional | CTA link URL (not used for "Call now" or "Offer") |
| gbp_offer_title | string Optional | Offer title (when CTA is "Offer") |
| gbp_offer_start_date | string Optional | Offer start date. Format: 2023-06-23 18:20:22 |
| gbp_offer_end_date | string Optional | Offer end date. Format: 2023-06-25 18:20:22 |
| gbp_offer_coupon_code | string Optional | Coupon code for the offer |
| gbp_offer_terms | string Optional | Terms and conditions |
| gbp_redeem_offer_link | string Optional | URL to redeem the offer |
YouTube Options
| Parameter | Type | Description |
|---|---|---|
| yt_title | string Optional | Video title |
| yt_category | string Optional |
Video category
Values:
Film & Animation Autos & Vehicles Music Pets & Animals Sports Travel & Events Gaming People & Blogs Comedy Entertainment News & Politics Howto & Style Education Science & Technology Nonprofits & ActivismDefault:
Entertainment |
| yt_privacy_status | string Optional |
Video privacy setting
Values:
Public Private UnlistedDefault:
Public |
| yt_user_tags | string Optional | Video tags (comma-separated) |
| yt_thumb | string Optional | Custom thumbnail URL |
| yt_video_made_for_kids | string Optional |
Made for kids designation
Values:
yes noDefault:
yes |
TikTok Options
| Parameter | Type | Description |
|---|---|---|
| tk_privacy_status | string Optional |
Video privacy setting
Values:
Public to Everyone Mutual Follow Friends Self OnlyDefault:
Public to Everyone |
| tk_allow_comments | string Optional |
Allow comments
Values:
yes noDefault:
yes |
| tk_allow_duet | string Optional |
Allow duets
Values:
yes noDefault:
yes |
| tk_allow_stitches | string Optional |
Allow stitches
Values:
yes noDefault:
yes |
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"id": "social_account_id",
"message": "Hello World! This is an immediate post.",
"image_url": ["https://example.com/image.jpg"]
}
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"id": "social_account_id",
"message": "This post is scheduled for Christmas!",
"image_url": ["https://example.com/holiday.jpg"],
"schedule_date_time": "2024-12-25 10:00:00"
}
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"id": "social_account_id",
"message": "Check out our amazing summer sale!",
"fb_message": "Check out our amazing summer sale! #facebook #summersale",
"tw_message": "Summer sale is here! Limited time only.",
"ln_message": "Excited to announce our summer sale. Great deals await!",
"in_message": "Summer vibes and summer sales!",
"gmb_message": "Visit our store for amazing summer deals!",
"pi_message": "Summer Sale - Up to 50% Off!",
"yt_message": "Watch our summer sale announcement",
"tk_message": "Summer sale starts now!",
"th_message": "Summer deals you can't miss!",
"bs_message": "Our biggest summer sale is here!",
"url": "https://yourwebsite.com/summer-sale",
"image_url": ["https://example.com/sale1.jpg", "https://example.com/sale2.jpg"],
"video_url": "https://example.com/summer-sale-video.mp4",
"fb_post_type": "feed",
"in_post_type": "feed",
"in_reel_share_in_feed": "yes",
"first_comment": "#summer #sale #deals #shopping",
"fb_first_comment": "#facebook #summersale #deals",
"ln_first_comment": "#linkedin #business #summersale",
"in_first_comment": "#summersale #deals #shopping #instagram",
"ln_document": "https://example.com/summer-catalog.pdf",
"ln_document_title": "Summer Sale Catalog 2024",
"pi_title": "Summer Sale - Best Deals of the Season!",
"gbp_cta": "Order online",
"gbp_cta_url": "https://yourwebsite.com/summer-sale",
"gbp_offer_title": "Summer Sale - 50% Off",
"gbp_offer_start_date": "2024-06-01 00:00:00",
"gbp_offer_end_date": "2024-06-30 23:59:59",
"gbp_offer_coupon_code": "SUMMER50",
"gbp_offer_terms": "Valid on selected items only",
"gbp_redeem_offer_link": "https://yourwebsite.com/redeem",
"yt_title": "Summer Sale Announcement 2024",
"yt_category": "Howto & Style",
"yt_privacy_status": "Public",
"yt_user_tags": "summer, sale, deals, shopping, discount",
"yt_thumb": "https://example.com/summer-thumbnail.jpg",
"yt_video_made_for_kids": "no",
"tk_privacy_status": "Public to Everyone",
"tk_allow_comments": "yes",
"tk_allow_duet": "yes",
"tk_allow_stitches": "yes",
"host_images_on_recurpost": "true",
"schedule_date_time": "2024-06-21 09:00:00"
}
Code Examples
curl -X POST https://social.recurpost.com/api/post_content \
-H "Content-Type: application/x-www-form-urlencoded" \
# Required parameters
-d "emailid=your@email.com" \
-d "pass_key=your_api_key" \
-d "id=fb_12345" \
-d "message=Check out our amazing summer sale!" \
# Scheduling (leave empty for immediate post)
-d "schedule_date_time=2024-06-21 09:00:00" \
# Media parameters
-d "url=https://yourwebsite.com/summer-sale" \
-d "image_url[]=https://example.com/sale1.jpg" \
-d "image_url[]=https://example.com/sale2.jpg" \
-d "video_url=https://example.com/video.mp4" \
-d "host_images_on_recurpost=true" \
# Platform-specific messages
-d "fb_message=Check out our amazing summer sale! #facebook #summersale" \
-d "tw_message=Summer sale is here! Limited time only." \
-d "ln_message=Excited to announce our summer sale. Great deals await!" \
-d "in_message=Summer vibes and summer sales!" \
-d "gmb_message=Visit our store for amazing summer deals!" \
-d "pi_message=Summer Sale - Up to 50% Off!" \
-d "yt_message=Watch our summer sale announcement" \
-d "tk_message=Summer sale starts now!" \
-d "th_message=Summer deals you can't miss!" \
-d "bs_message=Our biggest summer sale is here!" \
# Post type options
-d "fb_post_type=feed" \
-d "in_post_type=feed" \
-d "in_reel_share_in_feed=yes" \
# First comments
-d "first_comment=#summer #sale #deals #shopping" \
-d "fb_first_comment=#facebook #summersale #deals" \
-d "ln_first_comment=#linkedin #business #summersale" \
-d "in_first_comment=#summersale #deals #shopping #instagram" \
# LinkedIn options
-d "ln_document=https://example.com/summer-catalog.pdf" \
-d "ln_document_title=Summer Sale Catalog 2024" \
# Pinterest options
-d "pi_title=Summer Sale - Best Deals of the Season!" \
# Google Business Profile options
-d "gbp_cta=Order online" \
-d "gbp_cta_url=https://yourwebsite.com/summer-sale" \
-d "gbp_offer_title=Summer Sale - 50% Off" \
-d "gbp_offer_start_date=2024-06-01 00:00:00" \
-d "gbp_offer_end_date=2024-06-30 23:59:59" \
-d "gbp_offer_coupon_code=SUMMER50" \
-d "gbp_offer_terms=Valid on selected items only" \
-d "gbp_redeem_offer_link=https://yourwebsite.com/redeem" \
# YouTube options
-d "yt_title=Summer Sale Announcement 2024" \
-d "yt_category=Howto & Style" \
-d "yt_privacy_status=Public" \
-d "yt_user_tags=summer, sale, deals, shopping, discount" \
-d "yt_thumb=https://example.com/thumbnail.jpg" \
-d "yt_video_made_for_kids=no" \
# TikTok options
-d "tk_privacy_status=Public to Everyone" \
-d "tk_allow_comments=yes" \
-d "tk_allow_duet=yes" \
-d "tk_allow_stitches=yes"
// Using fetch API with all options
const formData = new FormData();
// Required parameters
formData.append('emailid', 'your@email.com');
formData.append('pass_key', 'your_api_key');
formData.append('id', 'fb_12345');
formData.append('message', 'Check out our amazing summer sale!');
// Scheduling (leave empty for immediate post)
formData.append('schedule_date_time', '2024-06-21 09:00:00');
// Media parameters
formData.append('url', 'https://yourwebsite.com/summer-sale');
formData.append('image_url', JSON.stringify(['https://example.com/sale1.jpg', 'https://example.com/sale2.jpg']));
formData.append('video_url', 'https://example.com/video.mp4');
formData.append('host_images_on_recurpost', 'true');
// Platform-specific messages
formData.append('fb_message', 'Check out our amazing summer sale! #facebook #summersale');
formData.append('tw_message', 'Summer sale is here! Limited time only.');
formData.append('ln_message', 'Excited to announce our summer sale. Great deals await!');
formData.append('in_message', 'Summer vibes and summer sales!');
formData.append('gmb_message', 'Visit our store for amazing summer deals!');
formData.append('pi_message', 'Summer Sale - Up to 50% Off!');
formData.append('yt_message', 'Watch our summer sale announcement');
formData.append('tk_message', 'Summer sale starts now!');
formData.append('th_message', 'Summer deals you can\'t miss!');
formData.append('bs_message', 'Our biggest summer sale is here!');
// Post type options
formData.append('fb_post_type', 'feed'); // feed, reels, story
formData.append('in_post_type', 'feed'); // feed, reels, story
formData.append('in_reel_share_in_feed', 'yes');
// First comments
formData.append('first_comment', '#summer #sale #deals #shopping');
formData.append('fb_first_comment', '#facebook #summersale #deals');
formData.append('ln_first_comment', '#linkedin #business #summersale');
formData.append('in_first_comment', '#summersale #deals #shopping #instagram');
// LinkedIn options
formData.append('ln_document', 'https://example.com/summer-catalog.pdf');
formData.append('ln_document_title', 'Summer Sale Catalog 2024');
// Pinterest options
formData.append('pi_title', 'Summer Sale - Best Deals of the Season!');
// Google Business Profile options
formData.append('gbp_cta', 'Order online');
formData.append('gbp_cta_url', 'https://yourwebsite.com/summer-sale');
formData.append('gbp_offer_title', 'Summer Sale - 50% Off');
formData.append('gbp_offer_start_date', '2024-06-01 00:00:00');
formData.append('gbp_offer_end_date', '2024-06-30 23:59:59');
formData.append('gbp_offer_coupon_code', 'SUMMER50');
formData.append('gbp_offer_terms', 'Valid on selected items only');
formData.append('gbp_redeem_offer_link', 'https://yourwebsite.com/redeem');
// YouTube options
formData.append('yt_title', 'Summer Sale Announcement 2024');
formData.append('yt_category', 'Howto & Style');
formData.append('yt_privacy_status', 'Public');
formData.append('yt_user_tags', 'summer, sale, deals, shopping, discount');
formData.append('yt_thumb', 'https://example.com/thumbnail.jpg');
formData.append('yt_video_made_for_kids', 'no');
// TikTok options
formData.append('tk_privacy_status', 'Public to Everyone');
formData.append('tk_allow_comments', 'yes');
formData.append('tk_allow_duet', 'yes');
formData.append('tk_allow_stitches', 'yes');
fetch('https://social.recurpost.com/api/post_content', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$curl = curl_init();
$postData = [
// Required parameters
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key',
'id' => 'fb_12345',
'message' => 'Check out our amazing summer sale!',
// Scheduling (leave empty for immediate post)
'schedule_date_time' => '2024-06-21 09:00:00',
// Media parameters
'url' => 'https://yourwebsite.com/summer-sale',
'image_url' => ['https://example.com/sale1.jpg', 'https://example.com/sale2.jpg'],
'video_url' => 'https://example.com/video.mp4',
'host_images_on_recurpost' => 'true',
// Platform-specific messages
'fb_message' => 'Check out our amazing summer sale! #facebook #summersale',
'tw_message' => 'Summer sale is here! Limited time only.',
'ln_message' => 'Excited to announce our summer sale. Great deals await!',
'in_message' => 'Summer vibes and summer sales!',
'gmb_message' => 'Visit our store for amazing summer deals!',
'pi_message' => 'Summer Sale - Up to 50% Off!',
'yt_message' => 'Watch our summer sale announcement',
'tk_message' => 'Summer sale starts now!',
'th_message' => 'Summer deals you can\'t miss!',
'bs_message' => 'Our biggest summer sale is here!',
// Post type options
'fb_post_type' => 'feed', // feed, reels, story
'in_post_type' => 'feed', // feed, reels, story
'in_reel_share_in_feed' => 'yes',
// First comments
'first_comment' => '#summer #sale #deals #shopping',
'fb_first_comment' => '#facebook #summersale #deals',
'ln_first_comment' => '#linkedin #business #summersale',
'in_first_comment' => '#summersale #deals #shopping #instagram',
// LinkedIn options
'ln_document' => 'https://example.com/summer-catalog.pdf',
'ln_document_title' => 'Summer Sale Catalog 2024',
// Pinterest options
'pi_title' => 'Summer Sale - Best Deals of the Season!',
// Google Business Profile options
'gbp_cta' => 'Order online',
'gbp_cta_url' => 'https://yourwebsite.com/summer-sale',
'gbp_offer_title' => 'Summer Sale - 50% Off',
'gbp_offer_start_date' => '2024-06-01 00:00:00',
'gbp_offer_end_date' => '2024-06-30 23:59:59',
'gbp_offer_coupon_code' => 'SUMMER50',
'gbp_offer_terms' => 'Valid on selected items only',
'gbp_redeem_offer_link' => 'https://yourwebsite.com/redeem',
// YouTube options
'yt_title' => 'Summer Sale Announcement 2024',
'yt_category' => 'Howto & Style',
'yt_privacy_status' => 'Public',
'yt_user_tags' => 'summer, sale, deals, shopping, discount',
'yt_thumb' => 'https://example.com/thumbnail.jpg',
'yt_video_made_for_kids' => 'no',
// TikTok options
'tk_privacy_status' => 'Public to Everyone',
'tk_allow_comments' => 'yes',
'tk_allow_duet' => 'yes',
'tk_allow_stitches' => 'yes'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://social.recurpost.com/api/post_content',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($postData)
]);
$response = curl_exec($curl);
$result = json_decode($response, true);
curl_close($curl);
print_r($result);
?>
import requests
import json
url = 'https://social.recurpost.com/api/post_content'
data = {
# Required parameters
'emailid': 'your@email.com',
'pass_key': 'your_api_key',
'id': 'fb_12345',
'message': 'Check out our amazing summer sale!',
# Scheduling (leave empty for immediate post)
'schedule_date_time': '2024-06-21 09:00:00',
# Media parameters
'url': 'https://yourwebsite.com/summer-sale',
'image_url': json.dumps(['https://example.com/sale1.jpg', 'https://example.com/sale2.jpg']),
'video_url': 'https://example.com/video.mp4',
'host_images_on_recurpost': 'true',
# Platform-specific messages
'fb_message': 'Check out our amazing summer sale! #facebook #summersale',
'tw_message': 'Summer sale is here! Limited time only.',
'ln_message': 'Excited to announce our summer sale. Great deals await!',
'in_message': 'Summer vibes and summer sales!',
'gmb_message': 'Visit our store for amazing summer deals!',
'pi_message': 'Summer Sale - Up to 50% Off!',
'yt_message': 'Watch our summer sale announcement',
'tk_message': 'Summer sale starts now!',
'th_message': "Summer deals you can't miss!",
'bs_message': 'Our biggest summer sale is here!',
# Post type options
'fb_post_type': 'feed', # feed, reels, story
'in_post_type': 'feed', # feed, reels, story
'in_reel_share_in_feed': 'yes',
# First comments
'first_comment': '#summer #sale #deals #shopping',
'fb_first_comment': '#facebook #summersale #deals',
'ln_first_comment': '#linkedin #business #summersale',
'in_first_comment': '#summersale #deals #shopping #instagram',
# LinkedIn options
'ln_document': 'https://example.com/summer-catalog.pdf',
'ln_document_title': 'Summer Sale Catalog 2024',
# Pinterest options
'pi_title': 'Summer Sale - Best Deals of the Season!',
# Google Business Profile options
'gbp_cta': 'Order online',
'gbp_cta_url': 'https://yourwebsite.com/summer-sale',
'gbp_offer_title': 'Summer Sale - 50% Off',
'gbp_offer_start_date': '2024-06-01 00:00:00',
'gbp_offer_end_date': '2024-06-30 23:59:59',
'gbp_offer_coupon_code': 'SUMMER50',
'gbp_offer_terms': 'Valid on selected items only',
'gbp_redeem_offer_link': 'https://yourwebsite.com/redeem',
# YouTube options
'yt_title': 'Summer Sale Announcement 2024',
'yt_category': 'Howto & Style',
'yt_privacy_status': 'Public',
'yt_user_tags': 'summer, sale, deals, shopping, discount',
'yt_thumb': 'https://example.com/thumbnail.jpg',
'yt_video_made_for_kids': 'no',
# TikTok options
'tk_privacy_status': 'Public to Everyone',
'tk_allow_comments': 'yes',
'tk_allow_duet': 'yes',
'tk_allow_stitches': 'yes'
}
response = requests.post(url, data=data)
result = response.json()
print(result)
Generate Content with AI
Generate social media content using AI. Supports multi-turn conversations for refining content.
/api/generate_content_with_ai
Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user |
| prompt_text | string Required | Topic or text to generate content about |
| ai_id | string Optional |
AI session ID for continuing conversations
Returned in the first response. Pass in subsequent requests to maintain context.
|
| chat_progress | string Optional |
Progress marker for conversation flow
Returned in response. Pass in subsequent requests.
|
| chat_history | array Optional |
Previous conversation messages
Array of messages with roles (user/assistant) and content
|
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"prompt_text": "Write a social media post about summer sale promotions"
}
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"prompt_text": "Make it shorter and add more emojis",
"ai_id": "ai_id_from_previous_response",
"chat_progress": "progress_from_previous_response"
}
Code Examples
curl -X POST https://social.recurpost.com/api/generate_content_with_ai \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "emailid=your@email.com" \
-d "pass_key=your_api_key" \
-d "prompt_text=Write a social media post about summer sale promotions"
# Continue conversation with ai_id
curl -X POST https://social.recurpost.com/api/generate_content_with_ai \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "emailid=your@email.com" \
-d "pass_key=your_api_key" \
-d "prompt_text=Make it shorter and add more emojis" \
-d "ai_id=ai_id_from_previous_response" \
-d "chat_progress=progress_from_previous_response"
// Initial request
const formData = new FormData();
formData.append('emailid', 'your@email.com');
formData.append('pass_key', 'your_api_key');
formData.append('prompt_text', 'Write a social media post about summer sale promotions');
fetch('https://social.recurpost.com/api/generate_content_with_ai', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
console.log('Generated content:', data);
// Store ai_id and chat_progress for continuing conversation
const aiId = data.ai_id;
const chatProgress = data.chat_progress;
})
.catch(error => console.error('Error:', error));
// Continue conversation
const continueFormData = new FormData();
continueFormData.append('emailid', 'your@email.com');
continueFormData.append('pass_key', 'your_api_key');
continueFormData.append('prompt_text', 'Make it shorter and add more emojis');
continueFormData.append('ai_id', 'ai_id_from_previous_response');
continueFormData.append('chat_progress', 'progress_from_previous_response');
fetch('https://social.recurpost.com/api/generate_content_with_ai', {
method: 'POST',
body: continueFormData
})
.then(response => response.json())
.then(data => console.log('Updated content:', data));
<?php
$curl = curl_init();
// Initial request
$postData = [
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key',
'prompt_text' => 'Write a social media post about summer sale promotions'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://social.recurpost.com/api/generate_content_with_ai',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($postData)
]);
$response = curl_exec($curl);
$result = json_decode($response, true);
// Store ai_id and chat_progress for continuing
$aiId = $result['ai_id'];
$chatProgress = $result['chat_progress'];
// Continue conversation
$continueData = [
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key',
'prompt_text' => 'Make it shorter and add more emojis',
'ai_id' => $aiId,
'chat_progress' => $chatProgress
];
curl_setopt(CURLOPT_POSTFIELDS, http_build_query($continueData));
$response = curl_exec($curl);
$result = json_decode($response, true);
curl_close($curl);
print_r($result);
?>
import requests
url = 'https://social.recurpost.com/api/generate_content_with_ai'
# Initial request
data = {
'emailid': 'your@email.com',
'pass_key': 'your_api_key',
'prompt_text': 'Write a social media post about summer sale promotions'
}
response = requests.post(url, data=data)
result = response.json()
print('Generated content:', result)
# Store ai_id and chat_progress for continuing
ai_id = result.get('ai_id')
chat_progress = result.get('chat_progress')
# Continue conversation
continue_data = {
'emailid': 'your@email.com',
'pass_key': 'your_api_key',
'prompt_text': 'Make it shorter and add more emojis',
'ai_id': ai_id,
'chat_progress': chat_progress
}
response = requests.post(url, data=continue_data)
updated_result = response.json()
print('Updated content:', updated_result)
Generate Image with AI
Generate images using AI based on text descriptions.
/api/generate_image_with_ai
Parameters
| Parameter | Type | Description |
|---|---|---|
| emailid | string Required | Email id of user |
| pass_key | string Required | Password Key of user |
| prompt_text | string Required | Detailed description of the image to generate |
{
"emailid": "your@email.com",
"pass_key": "your_api_key",
"prompt_text": "A professional photo of a steaming coffee cup on a rustic wooden table, morning sunlight, cozy cafe atmosphere"
}
Code Examples
curl -X POST https://social.recurpost.com/api/generate_image_with_ai \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "emailid=your@email.com" \
-d "pass_key=your_api_key" \
-d "prompt_text=A professional photo of a steaming coffee cup on a rustic wooden table, morning sunlight, cozy cafe atmosphere"
// Using fetch API
const formData = new FormData();
formData.append('emailid', 'your@email.com');
formData.append('pass_key', 'your_api_key');
formData.append('prompt_text', 'A professional photo of a steaming coffee cup on a rustic wooden table, morning sunlight, cozy cafe atmosphere');
fetch('https://social.recurpost.com/api/generate_image_with_ai', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
console.log('Generated image URL:', data);
// data.image_url contains the generated image
})
.catch(error => console.error('Error:', error));
<?php
$curl = curl_init();
$postData = [
'emailid' => 'your@email.com',
'pass_key' => 'your_api_key',
'prompt_text' => 'A professional photo of a steaming coffee cup on a rustic wooden table, morning sunlight, cozy cafe atmosphere'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://social.recurpost.com/api/generate_image_with_ai',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($postData)
]);
$response = curl_exec($curl);
$result = json_decode($response, true);
// $result['image_url'] contains the generated image URL
curl_close($curl);
print_r($result);
?>
import requests
url = 'https://social.recurpost.com/api/generate_image_with_ai'
data = {
'emailid': 'your@email.com',
'pass_key': 'your_api_key',
'prompt_text': 'A professional photo of a steaming coffee cup on a rustic wooden table, morning sunlight, cozy cafe atmosphere'
}
response = requests.post(url, data=data)
result = response.json()
# result['image_url'] contains the generated image URL
print('Generated image:', result)
Reference
Platform Prefixes
Quick reference for platform-specific parameter prefixes.
| Prefix | Platform | Example Parameters |
|---|---|---|
fb_ |
fb_message, fb_post_type, fb_first_comment |
|
in_ |
in_message, in_post_type, in_first_comment |
|
tw_ |
Twitter/X | tw_message |
ln_ |
ln_message, ln_first_comment, ln_document |
|
pi_ |
pi_message, pi_title |
|
yt_ |
YouTube | yt_message, yt_title, yt_category |
tk_ |
TikTok | tk_message, tk_privacy_status |
th_ |
Meta Threads | th_message |
bs_ |
Bluesky | bs_message |
gmb_ / gbp_ |
Google Business | gmb_message, gbp_cta, gbp_offer_title |
Date/Time Formats
Reference for date and time formats used in the API.
| Parameter | Format | Example |
|---|---|---|
| schedule_date_time | YYYY-MM-DD HH:MM:SS |
2024-06-23 15:30:00 |
| content_livedate | YYYY-MM-DD |
2024-06-23 |
| content_expiredate | YYYY-MM-DD |
2024-12-31 |
| gbp_offer_start_date | YYYY-MM-DD HH:MM:SS |
2024-06-23 09:00:00 |
| gbp_offer_end_date | YYYY-MM-DD HH:MM:SS |
2024-06-30 23:59:59 |
Troubleshooting
Solutions for common issues encountered when using the API.
Problem: Images are not appearing when the post is published.
Solution:
- Ensure
image_urlis an array, not a string - Verify URLs are publicly accessible (not behind authentication)
- Set
host_images_on_recurpostto"true"for reliability
"image_url": ["https://example.com/image1.jpg", "https://example.com/image2.jpg"]
"image_url": "https://example.com/image.jpg" // Wrong! Must be array
Problem: Getting 401 Unauthorized error.
Solution:
- Verify
pass_keyis the API key from Account Settings, NOT your login password - Ensure
emailidmatches your RecurPost account exactly - Check that your API key hasn't been regenerated
Problem: Getting 415 error when scheduling posts.
Solution:
- Ensure
schedule_date_timeis in the future - Use correct format:
YYYY-MM-DD HH:MM:SS - Example:
2024-12-25 10:00:00
Solution: Google Drive videos require special handling. See the detailed guide:
Google Drive Video Import Guide →Problem: Getting 400 Validation Error.
Solution:
- Check all required parameters are included
- Verify parameter names are spelled correctly
- Ensure JSON is valid (use a JSON validator)
- Check that
idis valid (library ID or social account ID)
Social Account List
Retrieve all connected social media accounts. Returns account IDs needed for posting content.
/api/social_account_listParameters
/api/post_contentand/api/history_dataendpoints.Code Examples