Move a queued export in the queue (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /admin/exports/{id}/priority

Moves a waiting export to the top or bottom of the export queue by removing and re-adding its job, which gives it a new queue job id (returned) and resets its retry count. An export with no live job or one a worker already picked up returns 400 and one with several queued jobs 409; if the re-add fails it returns 500 and the export has no queue job until it is re-run or resumed. Returns 404 for an unknown export and 403 while queue operations are turned off. Super admin only.

Path parameters

  • id string Required

    Id of the export to move

application/json

Body Required

  • position string Required

    Which end of the export wait list to move this export to. "top" makes it the next export a worker picks up; "bottom" puts it behind everything currently waiting.

    Values are top or bottom.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • exportId string Required
      • position string Required

        Which end of the wait list the job was moved to.

        Values are top or bottom.

      • reordered boolean Required

        Always true on a successful (non-throwing) response.

      • bullJobId string Required

        The job's NEW queue id. Reordering is physically a remove and re-add, so the id you saw a moment ago no longer exists — it is reported here rather than silently swapped.

      • previousBullJobId string Required

        The id the job had before the move, so a stale view can be matched up against the new one.

      • message string Required

        Plain-English summary of what happened, safe to show as-is.

    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/exports/{id}/priority
curl \
 --request POST 'http://api.example.com/admin/exports/{id}/priority' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "position": "top"
}'
Request examples
{
  "position": "top"
}
Response examples (200)
{
  "data": {
    "exportId": "65a1b2c3d4e5f6a7b8c9d0f1",
    "position": "top",
    "reordered": true,
    "bullJobId": "1907",
    "previousBullJobId": "1842",
    "message": "Export moved to the top of the queue with a new queue job id."
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}