API Reference

Queue System

Auto-schedule posts to time slots

The queue system lets you define time slots and automatically schedule posts — no need to pick a specific date/time for each one.

How It Works

  1. Go to Settings → Queue and configure your time slots
  2. When creating a post, choose "Add to Queue" instead of a date
  3. The system finds the next available slot and schedules your post

Three Scheduling Options

OptionDescription
Publish NowPost immediately
Schedule for LaterPick a specific date and time manually
Add to QueueAuto-assign to next available time slot

Configuration

Configure queue settings per profile in Settings → Queue:

  • Timezone — IANA format (e.g., Europe/Istanbul, America/New_York)
  • Time Slots — e.g., 9:00 AM, 12:00 PM, 5:00 PM
  • Active Days — Monday through Sunday (selectable)
  • Max Posts per Slot — 1 to 100 (default: 1)

API Usage

# Add post to queue (auto-assigns to next slot)
curl -X POST https://api.codivupload.com/v1/posts \
  -H "Authorization: Bearer YOUR_KEY" \
  -d '{
    "post_type": "image",
    "profile_name": "my_brand",
    "platforms": ["instagram", "facebook"],
    "media_urls": ["https://cdn.codivupload.com/photo.jpg"],
    "description": "Scheduled via queue!",
    "add_to_queue": true
  }'

# Get queue settings
curl https://api.codivupload.com/v1/queue/settings?profile_name=my_brand

# Preview upcoming slots
curl https://api.codivupload.com/v1/queue/preview?profile_name=my_brand&count=10

# Find next available slot
curl https://api.codivupload.com/v1/queue/next-slot?profile_name=my_brand

Default Settings

SettingDefault
TimezoneUTC
Slots9:00 AM, 12:00 PM, 5:00 PM
DaysEvery day (Mon–Sun)
Max per slot1

Queue Calculation Example

If you have 3 slots per day (9am, 12pm, 5pm) and you add 10 posts to the queue at once, they distribute like this:

Day9:00 AM12:00 PM5:00 PM
Day 1Post 1Post 2Post 3
Day 2Post 4Post 5Post 6
Day 3Post 7Post 8Post 9
Day 4Post 10

Posts fill slots sequentially. If a day is skipped (inactive day), the system moves to the next active day.

Queue Full?

If all slots for the next 30 days are occupied, adding a post to the queue returns a 409 Conflict error:

{
  "error": "Queue is full. No available slots in the next 30 days.",
  "code": "QUEUE_FULL"
}

To resolve:

  • Increase max_posts_per_slot to allow multiple posts per slot
  • Add more time slots per day
  • Enable additional active days
  • Cancel or reschedule existing queued posts

Timezone Examples

Use IANA timezone identifiers. Common values:

RegionTimezone ID
US EasternAmerica/New_York
US PacificAmerica/Los_Angeles
US CentralAmerica/Chicago
UKEurope/London
TurkeyEurope/Istanbul
GermanyEurope/Berlin
DubaiAsia/Dubai
IndiaAsia/Kolkata
JapanAsia/Tokyo
Australia (Sydney)Australia/Sydney
UTCUTC

Full list available at Wikipedia: tz database time zones.

Editing Queued Posts

Queued posts can be edited or cancelled at any time before their scheduled publish time. Use the dashboard or the API:

# Update a queued post (change content, reschedule, etc.)
curl -X POST https://api.codivupload.com/v1/posts/{id} \
  -H "Authorization: Bearer YOUR_KEY" \
  -d '{"description": "Updated caption text"}'

# Cancel (delete) a queued post
curl -X DELETE https://api.codivupload.com/v1/posts/{id} \
  -H "Authorization: Bearer YOUR_KEY"
Note: Posts that have already been published cannot be deleted via CodivUpload. Use each platform's native app or API to remove published content.