Modulify

Move a queued message

reorder_queued_message

Moves a message that is still waiting in a site's queue so it runs earlier or later.

POST /v1/reorder_queued_messageScopechat:writeMakes changes

Name its new neighbors by their Id. beforeId is the entry it should sit after, and afterId the entry it should sit before. Send at least one of them, and send both to drop it exactly between them.

Sending only one is reliable at the ends of the queue: beforeId naming the last entry moves it to the end, and afterId naming the first entry moves it to the front. Anywhere in the middle, send both. Both have to be entries that are still queued, so read list_queued_messages first.

Anyone in the workspace can move any queued message, not only their own, and moving yours ahead of somebody else's delays theirs. See Reorder.

Request

Call it with a POST to https://api.modulify.ai/v1/reorder_queued_message, sending the inputs below as a JSON object. The token needs the chat:write scope.

It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

curl -X POST https://api.modulify.ai/v1/reorder_queued_message \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","itemId":"ITEM_ID"}'

Over MCP, the same method is the reorder_queued_message tool.

Inputs

Input Type Required Description
projectId string Yes The site id, from list_sites or get_site.
itemId string Yes The Id of the queued message to move, exactly as list_queued_messages reported it.
beforeId string No The Id of the queued message this one should sit after. Send this, afterId or both.
afterId string No The Id of the queued message this one should sit before. Send this, beforeId or both.

Response

Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.