Update schedule
Create a new queue or update an existing one. Without queueId, creates/updates the default queue. With queueId, updates a specific queue. With setAsDefault=true, makes this queue the default for the profile.
API key authentication - use your Zernio API key as a Bearer token
In: header
Queue ID to update (optional)
Queue name
trueMake this queue the default
Whether to reschedule existing queued posts to match new slots
falseResponse Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.queue.updateQueueSlot({ body: { profileId: 'profile_abc123', timezone: 'string', slots: [ { dayOfWeek: 0, time: 'string', }, ], },});console.log(data);{
"success": true,
"schedule": {
"_id": "64f0a1b2c3d4e5f6a7b8c9d1",
"profileId": "64f0a1b2c3d4e5f6a7b8c9d0",
"name": "Morning Posts",
"timezone": "America/New_York",
"slots": [
{
"dayOfWeek": 1,
"time": "09:00"
},
{
"dayOfWeek": 3,
"time": "09:00"
},
{
"dayOfWeek": 5,
"time": "10:00"
}
],
"active": true,
"isDefault": true
},
"nextSlots": [
"2024-11-04T09:00:00-05:00",
"2024-11-06T09:00:00-05:00"
],
"reshuffledCount": 0
}{
"error": "Unauthorized"
}Get next available slot GET
Returns the next available queue slot for preview purposes. To create a queue post, use POST /v1/posts with queuedFromProfile instead of scheduledFor.
Delete schedule DELETE
Delete a queue from a profile. Requires queueId to specify which queue to delete. If deleting the default queue, another queue will be promoted to default.