Queues
Create a queue
A queue, running unless sent paused: records added by workflows (and syncs) wait in it until its flush rules send them to its consumer workflow. Send the status, rate limit and strategy of a queue read with GET to copy it. Send an Idempotency-Key to retry safely.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
region*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"Idempotency-Key?|Makes the create retry-safe for 24 hours: a retry with the same key answers the resource the first call created, with the Idempotent-Replayed: true header, and creates nothing. 1 to 255 visible ASCII characters. The same key with a different request answers 422; while the first call still runs, 409.
nullapplication/json- body
queue_name*Queue Name1 <= length <= 255queue_resource_id?|The id workflow steps name the queue by; generated from the name when absent
nullflush_batch_size*Flush Batch Size1 <= value <= 10000flush_record_max_age*Flush Record Max Age1 <= value <= 86400parent_folder_id?|The folder to create the queue in, the root when absent
nullstatus?|running when absent
nullflush_rate_limit_max_flush_count?|10 when absent
nullflush_rate_limit_time_window?|1 second when absent
nullflush_strategy?|fifo when absent
nullvalidate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
falseCreated
application/json- response
queue_id*Queue Idqueue_name*Queue Namequeue_resource_id*Queue Resource Idstatus*QueueStatus"running""paused"consumer_workflow_id*|The workflow that receives the flushed records, if any
flush_batch_size*Flush Batch SizeRecords sent to the consumer workflow per flush
flush_record_max_age*|Seconds a record may wait before the queue flushes
flush_rate_limit_max_flush_count*|Maximum flushes per rate limit window
flush_rate_limit_time_window*|The rate limit window, in seconds
flush_strategy*AppQueueFlushStrategyfifo sends the oldest records first, lifo the newest
"fifo""lifo"parent_folder_id*string|nullcreated_time*Created Timedate-timelast_modified_time*Last Modified Timedate-timeregion*Regions"besg""usnv"curl -X POST 'https://api.stacksync.com/v1/workspaces/0/queues?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "queue_name": "<queue_name>", "flush_batch_size": 1, "flush_record_max_age": 1}'{ "queue_id": "<queue_id>", "queue_name": "<queue_name>", "queue_resource_id": "<queue_resource_id>", "status": "running", "consumer_workflow_id": "<consumer_workflow_id>", "flush_batch_size": 0, "flush_record_max_age": 0, "flush_rate_limit_max_flush_count": 0, "flush_rate_limit_time_window": 0, "flush_strategy": "fifo", "parent_folder_id": "<parent_folder_id>", "created_time": "2027-01-15T09:00:00Z", "last_modified_time": "2027-01-15T09:00:00Z", "region": "besg"}