API Reference

Message Queue

Queue refinement prompts, reorder them, and process the queue to trigger deployments.

Last updated:

Message Queue API

Queue refinement prompts while a project is still deploying and process them sequentially. Useful when you want to batch multiple changes from an LLM agent.

Add to Queue

POST /api/v1/projects/{projectId}/queue
Content-Type: application/json

{ "message": "Add a contact form to the homepage" }

Returns the newly inserted queued message.

Reorder Queue

PUT /api/v1/projects/{projectId}/queue
Content-Type: application/json

{ "orderedIds": ["msg_3", "msg_1", "msg_2"] }

Reassigns positions based on the provided order.

Process Next

POST /api/v1/projects/{projectId}/process-queue

Drains the next queued message and triggers a refinement build. Works on projects whose status is live, and on failed projects that have a deployed URL (a failed build leaves the previous version serving, so the next queued message can still run). Consumes the normal refinement credit cost and is rate limited under the apiDeploy bucket.