Introduction
If you're managing social media accounts by hand, you already know it doesn't scale. APIs change, platforms add restrictions, and what worked last month breaks tomorrow. This guide walks through how to build automation systems that actually hold up, using a unified API approach.
Why Automate?
The short answer: you can't manually post to 7+ platforms and keep up. Automation lets you schedule across platforms at once, stay consistent without babysitting a calendar, and spend time on content instead of copy-pasting. Each platform has its own quirks too. Twitter/X wants short punchy text, LinkedIn skews professional, Instagram is visual-first, TikTok follows trends, and so on. A good automation setup handles all of that from one place.
Choosing the Right API Approach
Direct APIs vs. Unified APIs
You can integrate with each platform directly (Twitter API, Meta Graph API, LinkedIn API, etc.) or use a unified API like Zernio that wraps them all. Going direct gives you full control, but you're signing up for a lot of maintenance. Every platform has different auth flows, rate limits, error formats, and they all break at different times. A unified API handles that complexity for you: one endpoint, one auth method, consistent responses.
Building Your First Automation
Step 1: Create a Profile
First, you'll need to create a profile to organize your social media accounts. Zernio uses a profile-based architecture where each profile can have one account per platform:
# Create a profile to organize your social accounts
curl -X POST https://zernio.com/api/v1/profiles \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Personal Brand",
"description": "My personal social media accounts",
"color": "#ffeda0"
}'Step 2: Connect Social Accounts
Next, connect your social media accounts to the profile using OAuth flows:
# Connect social accounts to your profile (redirects to OAuth)
curl "https://zernio.com/api/v1/connect/twitter?profileId=PROFILE_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
# Connect with custom redirect (for your own app)
curl "https://zernio.com/api/v1/connect/twitter?profileId=PROFILE_ID&redirect_url=https://myapp.com/oauth-success" \
-H "Authorization: Bearer YOUR_API_KEY"
# Connect other platforms
curl "https://zernio.com/api/v1/connect/instagram?profileId=PROFILE_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
curl "https://zernio.com/api/v1/connect/linkedin?profileId=PROFILE_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Step 3: Schedule Your First Post
Once your accounts are connected, posting content is straightforward:
# Schedule a post using accounts from your profile
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello, world! ๐",
"scheduledFor": "2024-01-01T12:00:00",
"timezone": "America/New_York",
"profileId": "PROFILE_ID",
"platforms": [
{"platform": "twitter", "accountId": "TWITTER_ACCOUNT_ID"},
{"platform": "linkedin", "accountId": "LINKEDIN_ACCOUNT_ID"}
]
}'Step 4: Upload Media Content
To add images or videos to your posts, first upload the media:
# Upload media file
curl -X POST https://zernio.com/api/v1/media \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@image.jpg"
# Then reference it in your post
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Check out this amazing sunset! ๐
",
"profileId": "PROFILE_ID",
"platforms": [
{"platform": "instagram", "accountId": "INSTAGRAM_ACCOUNT_ID"},
{"platform": "twitter", "accountId": "TWITTER_ACCOUNT_ID"},
{"platform": "facebook", "accountId": "FACEBOOK_ACCOUNT_ID"}
],
"mediaItems": [
{
"type": "image",
"url": "media_url_from_upload",
"filename": "sunset.jpg"
}
]
}'Stop building social integrations from scratch.
One API call to publish, schedule, and manage posts across 15+ platforms.
Advanced Automation Strategies
Plan Limits
Zernio has usage limits per plan. Here's what you get:
- Free: 20 posts/month, 2 profiles
- Build: 120 posts/month, 10 profiles
- Accelerate: Unlimited posts, 50 profiles (stackable)
- Unlimited: Unlimited posts, unlimited profiles
Adapting Content per Platform
Even with a unified API, you should tailor content. Twitter/X caps at 280 chars. LinkedIn goes up to 3,000 and works best with a professional tone. Instagram maxes at 2,200 characters and is visual-first. TikTok (2,200) rewards trend-aware captions. Facebook allows 2,000 characters, YouTube 5,000, and Threads just 500.
Timezone Handling
Zernio converts timezones for you. Just pass your local timezone:
# Schedule for your local timezone
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Good morning! ๐
",
"scheduledFor": "2024-12-21T09:00:00",
"timezone": "America/New_York",
"profileId": "PROFILE_ID",
"platforms": [
{"platform": "twitter", "accountId": "TWITTER_ACCOUNT_ID"},
{"platform": "linkedin", "accountId": "LINKEDIN_ACCOUNT_ID"}
]
}'Error Handling
You'll want to handle rate limits (429) and plan limit errors (403). Here's a basic retry pattern:
// Example error handling in JavaScript
async function postWithRetry(postData, maxRetries = 3) {
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
const response = await fetch('https://zernio.com/api/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(postData)
});
if (response.ok) {
return await response.json();
}
if (response.status === 403) {
const error = await response.json();
if (error.error.includes('Upload limit')) {
throw new Error('Upload limit reached. Consider upgrading your plan.');
}
}
if (response.status === 429) {
// Rate limit hit, wait before retry
await sleep(Math.pow(2, attempt) * 1000);
continue;
}
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
} catch (error) {
if (attempt === maxRetries) {
throw error;
}
await sleep(1000 * attempt);
}
}
}Monitoring and Analytics
Checking Your Usage
Hit the usage endpoint to see where you stand:
# Get your current usage statistics
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://zernio.com/api/v1/usage-statsResponse looks like this:
{
"planName": "Accelerate",
"billingPeriod": "yearly",
"limits": {
"uploads": -1,
"profiles": 50,
},
"usage": {
"uploads": 847,
"profiles": 12,
"lastReset": "2024-01-01T00:00:00.000Z"
},
"canUpload": true,
"canCreateProfile": true
}Managing Posts
A few more endpoints you'll use regularly:
# Get all your posts with pagination
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zernio.com/api/v1/posts?page=1&limit=10&status=scheduled"
# Get connected accounts for a profile
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zernio.com/api/v1/accounts?profileId=PROFILE_ID"
# Update a scheduled post
curl -X PUT https://zernio.com/api/v1/posts/POST_ID \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content":"Updated content"}'Quick Tips
- Always pass a timezone when scheduling. Zernio handles the UTC conversion.
- Check /usage-stats before big batch operations so you don't hit plan limits mid-run.
- Use draft mode to test posts before going live.
- Handle 429 (rate limit) and 403 (plan limit) responses with proper retry logic.
- Published posts can't be deleted via the API, so double-check before publishing.
Scaling Your Automation
Multi-Profile Management
Running multiple brands or clients? Create separate profiles for each:
# Create profiles for different brands
curl -X POST https://zernio.com/api/v1/profiles \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Client A - Tech Startup",
"description": "Social media for tech startup client",
"color": "#3B82F6"
}'
curl -X POST https://zernio.com/api/v1/profiles \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Client B - E-commerce",
"description": "Social media for e-commerce client",
"color": "#10B981"
}'Targeting Specific Platforms
You don't have to post everywhere at once. Use the platforms array to pick which accounts get each post:
# Professional content for LinkedIn only
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Industry insights: The future of API development...",
"profileId": "PROFILE_ID",
"platforms": [{"platform": "linkedin", "accountId": "LINKEDIN_ACCOUNT_ID"}],
"scheduledFor": "2024-12-21T09:00:00",
"timezone": "America/New_York"
}'
# Visual content for Instagram and TikTok
curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Behind the scenes at our office! ๐ธ #worklife",
"profileId": "PROFILE_ID",
"platforms": [
{"platform": "instagram", "accountId": "INSTAGRAM_ACCOUNT_ID"},
{"platform": "tiktok", "accountId": "TIKTOK_ACCOUNT_ID"}
],
"mediaItems": [{"type": "image", "url": "office_photo_url"}]
}'Get Started
- Sign up free at zernio.com
- Connect a social account via OAuth
- Make your first API call using the docs
- Scale up as you need more platforms and profiles
Zernio runs at 99.97% uptime across 9 platforms. You handle the content, we handle the plumbing.