Skip to main content
GET
/
api
/
tasks
/
runs
cURL
curl --request GET \
  --url https://recoup-api.vercel.app/api/tasks/runs
{
  "status": "success",
  "runs": [
    {
      "id": "<string>",
      "status": "PENDING_VERSION",
      "taskIdentifier": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "idempotencyKey": "<string>",
      "version": "<string>",
      "isTest": true,
      "startedAt": "2023-11-07T05:31:56Z",
      "finishedAt": "2023-11-07T05:31:56Z",
      "delayedUntil": "2023-11-07T05:31:56Z",
      "ttl": "<unknown>",
      "expiredAt": "2023-11-07T05:31:56Z",
      "tags": [
        "<string>"
      ],
      "metadata": {},
      "costInCents": 123,
      "baseCostInCents": 123,
      "durationMs": 123,
      "env": {
        "id": "<string>",
        "name": "<string>",
        "user": "<string>"
      },
      "depth": 123,
      "batchId": "<string>",
      "triggerFunction": "trigger",
      "payload": "<unknown>",
      "output": "<unknown>",
      "error": {
        "message": "<string>",
        "name": "<string>",
        "stackTrace": "<string>"
      },
      "attempts": [
        {
          "id": "<string>",
          "status": "PENDING",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "startedAt": "2023-11-07T05:31:56Z",
          "completedAt": "2023-11-07T05:31:56Z",
          "error": {
            "message": "<string>",
            "name": "<string>",
            "stackTrace": "<string>"
          }
        }
      ],
      "schedule": {},
      "relatedRuns": {}
    }
  ]
}

Query Parameters

runId
string

The unique identifier of a specific task run to retrieve. If omitted, returns a list of recent runs for the authenticated account.

limit
integer
default:20

Maximum number of runs to return when listing (ignored when runId is provided). Default 20, max 100.

Required range: 1 <= x <= 100
account_id
string<uuid>

Filter runs by account ID. When provided, returns runs tagged with account:<account_id>. Only applicable when the authenticated account has access to multiple accounts via organization membership.

Response

Task runs retrieved successfully

status
enum<string>
required

Indicates the request was successful

Available options:
success
runs
object[]
required

List of recent task runs for the authenticated account. Each item is a raw Trigger.dev SDK run object (same shape as TaskRunResponse, but without output and error fields).