Queue Scheduling
Drip-feed posts automatically using profile queues instead of computing schedule times yourself
Queues let you define recurring posting slots on a profile (for example, every weekday at 9:00 and 17:00). Instead of computing a scheduledFor time for every post, pass queuedFromProfile when creating the post and Zernio assigns it to the next available slot.
This is the answer to "how do I drip-feed 50 posts": create them in a loop with queuedFromProfile and each one lands on the next free slot, in order.
Schedule a post via queue
Pass the profile ID as queuedFromProfile instead of scheduledFor:
const { data } = await zernio.posts.createPost({
body: {
content: 'Post 1 of 50',
platforms: [
{ platform: 'twitter', accountId: 'acc_xyz789' }
],
queuedFromProfile: 'YOUR_PROFILE_ID'
}
});
console.log(data.post.scheduledFor); // the slot Zernio assignedresult = client.posts.create_post(
content="Post 1 of 50",
platforms=[
{"platform": "twitter", "accountId": "acc_xyz789"}
],
queued_from_profile="YOUR_PROFILE_ID",
)
print(result["post"]["scheduledFor"]) # the slot Zernio assignedcurl -X POST "https://zernio.com/api/v1/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Post 1 of 50",
"platforms": [
{ "platform": "twitter", "accountId": "acc_xyz789" }
],
"queuedFromProfile": "YOUR_PROFILE_ID"
}'The response comes back with status: "scheduled", the assigned time in scheduledFor, and the queue context echoed in queuedFromProfile and queueId. Repeat the call for each post in your batch; every post takes the next free slot.
Using a specific queue
A profile can have multiple queues. Pass queueId alongside queuedFromProfile to target one; if omitted, the profile's default queue is used.
Previewing the next slot
GET /v1/queue/next-slot returns the next available slot for a profile. Use it for display purposes only (for example, showing the user when their post would go out).
Do not call /v1/queue/next-slot and pass the returned time as scheduledFor. That bypasses queue locking, so two concurrent creates can land on the same slot. Always schedule queue posts with queuedFromProfile and let the API assign the time.
See the Create post endpoint for all fields, and the Queue endpoints for managing slots.