Skip to main content
GET
/
api
/
tasks
/
runs
cURL
curl --request GET \
  --url https://recoup-api.vercel.app/api/tasks/runs \
  --header 'x-api-key: <api-key>'
{
  "status": "pending",
  "taskIdentifier": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "data": "<unknown>",
  "error": "<string>",
  "metadata": {
    "currentStep": "<string>",
    "logs": [
      "<string>"
    ]
  },
  "startedAt": "2023-11-07T05:31:56Z",
  "finishedAt": "2023-11-07T05:31:56Z",
  "durationMs": 123
}

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Query Parameters

runId
string
required

The unique identifier of the task run to check

Response

Task run status retrieved successfully

status
enum<string>
required

The current status of the task run

Available options:
pending,
complete,
failed
taskIdentifier
string
required

The task type identifier (e.g. 'setup-sandbox', 'run-sandbox-command')

createdAt
string<date-time>
required

When the task run was created

data
any | null

The response data from the completed task. Only present when status is complete. Structure varies based on the task type.

error
string

Error message describing why the task run failed. Only present when status is failed.

metadata
object

Structured metadata emitted by the task during execution. Contains currentStep (string) and logs (string array) for real-time progress tracking.

startedAt
string<date-time> | null

When the task run started executing

finishedAt
string<date-time> | null

When the task run finished (null if still running)

durationMs
number | null

Total duration in milliseconds (null if still running)