Queue System
The queue system allows you to automatically schedule posts to predefined time slots. Instead of specifying an exact date/time with scheduled_date, you can use add_to_queue=true to have the system automatically assign your post to the next available slot.
How It Works
The queue is always active with default time slots (9am, 12pm, 5pm Eastern Time). You can customize these slots, timezone, and active days through the Queue Settings endpoints.
When you upload content with add_to_queue=true:
- The system finds the next available slot based on your queue configuration
- Your post is automatically scheduled to that slot
- You receive a
job_idto track the scheduled post
Multiple Posts Per Slot
By default, each slot accepts 1 post. You can increase this with the max_posts_per_slot setting to allow multiple posts in the same time slot. This is useful when you want to post to different platforms at the same time (e.g., an Instagram post and a Facebook post both at 9am).
You can also mark individual slots as full to prevent new posts from being added, even if they haven't reached the maximum capacity.
Using the Queue in Uploads
Add the add_to_queue parameter to any upload endpoint:
| Name | Type | Required | Description |
|---|---|---|---|
| add_to_queue | Boolean | No | If true, automatically schedules the post to your next available queue slot. Cannot be used together with scheduled_date. |
| max_posts_per_slot | Integer | No | Override the profile's max_posts_per_slot setting for this request. Only used when add_to_queue=true. |
Example Request
curl -X POST "https://api.upload-post.com/api/upload" \
-H "Authorization: Apikey YOUR_API_KEY" \
-F "user=my_profile" \
-F "platform[]=instagram" \
-F "platform[]=tiktok" \
-F "video=@my_video.mp4" \
-F "title=My awesome video" \
-F "add_to_queue=true"
Example with Multiple Posts Per Slot
# First post goes to 9am slot
curl -X POST "https://api.upload-post.com/api/upload" \
-H "Authorization: Apikey YOUR_API_KEY" \
-F "user=my_profile" \
-F "platform[]=instagram" \
-F "[email protected]" \
-F "title=Instagram video" \
-F "add_to_queue=true" \
-F "max_posts_per_slot=3"
# Second post also goes to 9am slot (same slot, different platform)
curl -X POST "https://api.upload-post.com/api/upload" \
-H "Authorization: Apikey YOUR_API_KEY" \
-F "user=my_profile" \
-F "platform[]=facebook" \
-F "[email protected]" \
-F "title=Facebook video" \
-F "add_to_queue=true" \
-F "max_posts_per_slot=3"
Success Response 202 Accepted
{
"success": true,
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"scheduled_date": "2025-01-30T14:00:00+00:00",
"queue_slot": "2025-01-30T14:00:00+00:00",
"message": "Post added to queue"
}
Get Queue Settings
Retrieve the current queue configuration for a profile.
| Endpoint | GET /api/uploadposts/queue/settings |
| Authentication | Required. Authorization: Apikey <token> |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| profile_username | String | Yes | The profile to get settings for |
Success Response 200 OK
{
"success": true,
"queue_settings": {
"timezone": "America/New_York",
"slots": [
{ "hour": 9, "minute": 0 },
{ "hour": 12, "minute": 0 },
{ "hour": 17, "minute": 0 }
],
"days_of_week": [0, 1, 2, 3, 4, 5, 6],
"max_posts_per_slot": 1,
"full_slots": []
},
"configured": true
}
| Field | Type | Description |
|---|---|---|
| configured | Boolean | At the top level, next to queue_settings: true once queue settings were saved for this profile; false means queue_settings shows the defaults because the queue was never configured. Also in the answer of Update Queue Settings |
| timezone | String | IANA timezone for the queue slots (e.g., "America/New_York", "Europe/Madrid") |
| slots | Array | Array of time slots with hour (0-23) and minute (0-59) |
| days_of_week | Array | Active days: 0=Monday, 1=Tuesday, ..., 6=Sunday |
| max_posts_per_slot | Integer | Maximum number of posts allowed per time slot (default: 1) |
| full_slots | Array | List of ISO 8601 datetimes that have been manually marked as full |
| slots_mode | String | fixed (default: the queue uses slots) or auto (the queue uses auto_slots, see Automatic slots) |
| effective_slots | Array | The slots the queue is filling right now: auto_slots in auto mode once computed, otherwise slots |
| auto_slots | Array | Auto mode only: the recommended hours, as { "hour", "minute" } in timezone |
| auto_slots_info | Object | Auto mode only: computed_at, timezone, count, status and, per network, the source and confidence it contributed (pending if it was still answering when the calculation stopped waiting; see Best Time to Post) |
| auto_platforms | Array | Auto mode only: the networks it was asked to use (empty = every connected network) |
Update Queue Settings
Update the queue configuration for a profile.
| Endpoint | POST /api/uploadposts/queue/settings |
| Authentication | Required. Authorization: Apikey <token> |
Body Parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| profile_username | String | Yes | The profile to update settings for |
| timezone | String | No | IANA timezone (e.g., "Europe/London"). See valid timezones. |
| slots | Array | No | Array of slot objects: [{ "hour": 9, "minute": 0 }, ...]. Max 24 slots. |
| days_of_week | Array | No | Array of active days (0-6). Example: [0, 1, 2, 3, 4] for Monday-Friday. |
| max_posts_per_slot | Integer | No | Maximum posts per slot (1-100). Default: 1. Set higher to allow multiple posts in the same time slot. |
| slots_mode | String | No | auto or fixed. Sending "slots": "auto" does the same as "slots_mode": "auto". Sending a slots array switches back to fixed. |
| auto_slots_count | Integer | No | Auto mode: how many hours per day (1-12). Default: the number of fixed slots, or 3. |
| auto_platforms | Array | No | Auto mode: networks to take into account, e.g. ["instagram", "tiktok"] (up to 6). Default: every connected network that has best times, except X, which is only used when you list it. |
| refresh | Boolean | No | Auto mode: true recalculates the best times if their cached answer is at least 24 hours old (YouTube and X: 7 days). |
Example Request
curl -X POST "https://api.upload-post.com/api/uploadposts/queue/settings" \
-H "Authorization: Apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile_username": "my_profile",
"timezone": "Europe/Madrid",
"slots": [
{ "hour": 8, "minute": 30 },
{ "hour": 13, "minute": 0 },
{ "hour": 19, "minute": 30 }
],
"days_of_week": [0, 1, 2, 3, 4],
"max_posts_per_slot": 3
}'
Success Response 200 OK
{
"success": true,
"queue_settings": {
"timezone": "Europe/Madrid",
"slots": [
{ "hour": 8, "minute": 30 },
{ "hour": 13, "minute": 0 },
{ "hour": 19, "minute": 30 }
],
"days_of_week": [0, 1, 2, 3, 4],
"max_posts_per_slot": 3
}
}
Automatic slots (slots=auto)
You can let the queue choose its hours. In auto mode it fills the best hours from Best Time to Post for the profile's networks:
curl -X POST "https://api.upload-post.com/api/uploadposts/queue/settings" \
-H "Authorization: Apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile_username": "my_profile",
"timezone": "Europe/Madrid",
"slots": "auto",
"auto_slots_count": 3,
"auto_platforms": ["instagram", "tiktok"]
}'
{
"success": true,
"queue_settings": {
"timezone": "Europe/Madrid",
"slots": [{ "hour": 9, "minute": 0 }, { "hour": 12, "minute": 0 }, { "hour": 17, "minute": 0 }],
"slots_mode": "auto",
"auto_slots": [{ "hour": 8, "minute": 0 }, { "hour": 13, "minute": 0 }, { "hour": 20, "minute": 0 }],
"effective_slots": [{ "hour": 8, "minute": 0 }, { "hour": 13, "minute": 0 }, { "hour": 20, "minute": 0 }],
"auto_slots_info": {
"computed_at": "2026-11-14T12:00:00+00:00",
"timezone": "Europe/Madrid",
"count": 3,
"status": "ok",
"platforms": {
"instagram": { "source": "audience_activity", "confidence": "high" },
"tiktok": { "source": "account_posts", "confidence": "medium" }
}
},
"auto_platforms": ["instagram", "tiktok"],
"days_of_week": [0, 1, 2, 3, 4, 5, 6],
"max_posts_per_slot": 1,
"full_slots": []
}
}
- It is opt-in. A queue stays on its fixed
slotsuntil you ask forauto. Posts you already scheduled do not move. - Each network's hourly curve is weighted by its confidence and the curves are added together. The best hours win, kept at least 2 hours apart. An hour scoring under 30 % of the best hour is not used, so you may get fewer slots than you asked for.
- Your fixed
slotsstay stored. They are used while there is no data (status: "no_data_using_fixed_slots") and whenever you go back tofixed. - The hours are recalculated when you change
timezone,auto_slots_countorauto_platforms. They are also recalculated when you read the settings, the preview orGET /queue/next-slotmore than 7 days after the last calculation. Adding posts withadd_to_queue=truenever triggers a recalculation, so it never slows your uploads down. If you only add posts through the API, readGET /queue/next-slot(or the settings) from time to time to keep the hours fresh. - A recalculation that finds no data keeps the previous hours when they were
calculated for the same timezone (
status: "no_data_kept_previous"or"refresh_failed_kept_previous"). After a timezone change, the old hours are dropped, because they would publish at the wrong local time. - The request waits for the networks for a limited time. A network that has not
answered by then shows
"source": "pending"and is used on the next calculation. GET /queue/previewreturnsslots_modetoo.- Errors:
400 invalid_parameterfor a badslots_mode,auto_slots_countorauto_platforms.503 feature_disabledif automatic slots are temporarily unavailable; keep using fixed slots.
Get Queue Preview
Preview the next upcoming queue slots and their availability.
| Endpoint | GET /api/uploadposts/queue/preview |
| Authentication | Required. Authorization: Apikey <token> |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| profile_username | String | Yes | The profile to preview |
| count | Integer | No | Number of slots to return (default: 10, max: 50) |
Success Response 200 OK
{
"success": true,
"timezone": "America/New_York",
"max_posts_per_slot": 3,
"slots": [
{
"datetime_utc": "2025-01-30T14:00:00+00:00",
"datetime_local": "2025-01-30T09:00:00-05:00",
"available": true,
"post_count": 0,
"max_posts_per_slot": 3,
"is_full": false,
"manually_full": false
},
{
"datetime_utc": "2025-01-30T17:00:00+00:00",
"datetime_local": "2025-01-30T12:00:00-05:00",
"available": true,
"post_count": 2,
"max_posts_per_slot": 3,
"is_full": false,
"manually_full": false,
"scheduled_posts": [
{
"job_id": "abc123",
"title": "My Instagram post",
"platforms": ["instagram"]
},
{
"job_id": "def456",
"title": "My Facebook post",
"platforms": ["facebook"]
}
]
},
{
"datetime_utc": "2025-01-30T22:00:00+00:00",
"datetime_local": "2025-01-30T17:00:00-05:00",
"available": false,
"post_count": 3,
"max_posts_per_slot": 3,
"is_full": true,
"manually_full": false,
"scheduled_posts": [...]
}
],
"next_available": "2025-01-30T14:00:00+00:00"
}
| Field | Type | Description |
|---|---|---|
| post_count | Integer | Number of posts currently scheduled in this slot |
| max_posts_per_slot | Integer | Maximum posts allowed per slot |
| is_full | Boolean | true if the slot is at capacity or manually marked as full |
| manually_full | Boolean | true if the slot was manually marked as full via the Mark Slot Full endpoint |
| scheduled_posts | Array | List of all posts scheduled in this slot (when multiple posts per slot is enabled) |
| scheduled_post | Object | First scheduled post in the slot (for backward compatibility) |
Mark Slot Full
Manually mark a specific queue slot as full, preventing new posts from being added to it even if it hasn't reached max_posts_per_slot.
| Endpoint | POST /api/uploadposts/queue/slot-full |
| Authentication | Required. Authorization: Apikey <token> |
Body Parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| profile_username | String | Yes | The profile to update |
| slot_datetime | String | Yes | ISO 8601 datetime of the slot to mark as full (UTC) |
Example Request
curl -X POST "https://api.upload-post.com/api/uploadposts/queue/slot-full" \
-H "Authorization: Apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile_username": "my_profile",
"slot_datetime": "2025-01-30T14:00:00+00:00"
}'
Success Response 200 OK
{
"success": true,
"message": "Slot 2025-01-30T14:00:00+00:00 marked as full",
"full_slots": ["2025-01-30T14:00:00+00:00"]
}
Unmark Slot Full
Remove the full mark from a slot, allowing new posts to be added again.
| Endpoint | DELETE /api/uploadposts/queue/slot-full |
| Authentication | Required. Authorization: Apikey <token> |
Body Parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
| profile_username | String | Yes | The profile to update |
| slot_datetime | String | Yes | ISO 8601 datetime of the slot to unmark (UTC) |
Example Request
curl -X DELETE "https://api.upload-post.com/api/uploadposts/queue/slot-full" \
-H "Authorization: Apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile_username": "my_profile",
"slot_datetime": "2025-01-30T14:00:00+00:00"
}'
Success Response 200 OK
{
"success": true,
"message": "Slot 2025-01-30T14:00:00+00:00 unmarked as full",
"full_slots": []
}
Get Next Available Slot
Get the next available queue slot for a profile.
| Endpoint | GET /api/uploadposts/queue/next-slot |
| Authentication | Required. Authorization: Apikey <token> |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| profile_username | String | Yes | The profile to check |
Success Response 200 OK
{
"success": true,
"next_slot": {
"datetime_utc": "2025-01-30T14:00:00+00:00",
"datetime_local": "2025-01-30T09:00:00-05:00",
"timezone": "America/New_York"
}
}
If no slots are available within the next 30 days:
{
"success": true,
"next_slot": null,
"message": "No available slots found"
}
Default Configuration
If you haven't customized your queue settings, these defaults apply:
| Setting | Default Value |
|---|---|
| Timezone | America/New_York (Eastern Time) |
| Slots | 9:00 AM, 12:00 PM, 5:00 PM |
| Days of week | All days (Monday-Sunday) |
| Max posts per slot | 1 |
See Also
- Upload Video - Video upload endpoint
- Upload Photos - Photo upload endpoint
- Upload Text - Text post endpoint
- Schedule Posts - Manage scheduled posts
- Upload Status - Check upload/job status