> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# List delegate tasks

GET https://api.runtype.com/v1/delegate-tasks

Your organization's delegated tasks, newest first. API keys need `DELEGATE_TASKS:READ`.

Reference: https://docs.runtype.com/api-reference/runtype-api/delegate-tasks/list-delegate-tasks

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Query parameters

- `status` (enum, optional)
  - Allowed values: `queued`, `running`, `input_required`, `completed`, `failed`, `cancelled`
- `cursor` (string, optional)
- `limit` (string, optional)

## Response

### 200

One page of tasks

- `data` (list of V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItems, required)
- `pagination` (Pagination, required)

## Errors

### 400 Bad Request Error

Invalid limit

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 403 Forbidden Error

Missing API key scope

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 404 Not Found Error

Feature disabled, or no such task in this organization

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 503 Service Unavailable Error

The operator agent is not available on this deployment

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

## Types

### V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItems

- `apiKeyId` (string, required, nullable)
- `clientName` (string, required, nullable)
- `clientVersion` (string, required, nullable)
- `completedAt` (string, required, nullable)
- `createdAt` (string, required)
- `error` (string, required, nullable)
- `id` (string, required)
- `instruction` (string, required)
- `lastEventSeq` (integer, required)
- `modelRoundCount` (integer, required)
- `organizationId` (string, required)
- `question` (string, required, nullable)
- `result` (V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsResult, required, nullable)
- `startedAt` (string, required, nullable)
- `status` (enum, required)
  - Allowed values: `queued`, `running`, `input_required`, `completed`, `failed`, `cancelled`
- `summary` (string, required, nullable)
- `toolCallCount` (integer, required)
- `totalCost` (double, required, nullable)
- `touchedEntities` (list of V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsTouchedEntitiesItems, required)
- `updatedAt` (string, required)
- `userId` (string, required)
- `context` (any, optional)

### Pagination

- `currentOffset` (integer, required)
- `hasMore` (boolean, required)
- `hasPrev` (boolean, required)
- `limit` (integer, required)
- `nextCursor` (string, required, nullable)
- `prevCursor` (string, required, nullable)
- `currentPage` (integer, optional)
- `totalCount` (integer, optional)
- `totalPages` (integer, optional)

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsResult

- `links` (list of V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsResultLinksItems, required)
- `modelRoundCount` (integer, required)
- `summary` (string, required)
- `toolCallCount` (integer, required)
- `touchedEntities` (list of V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsResultTouchedEntitiesItems, required)
- `totalCost` (double, optional)
- `warnings` (list of string, optional)

### V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsTouchedEntitiesItems

- `action` (enum, required)
  - Allowed values: `created`, `updated`, `deleted`, `executed`, `read`
- `id` (string, required)
- `kind` (string, required)
- `name` (string, optional)

### V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsResultLinksItems

- `label` (string, required)
- `url` (string, required)

### V1DelegateTasksGetResponsesContentApplicationJsonSchemaDataItemsResultTouchedEntitiesItems

- `action` (enum, required)
  - Allowed values: `created`, `updated`, `deleted`, `executed`, `read`
- `id` (string, required)
- `kind` (string, required)
- `name` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "apiKeyId": "key_01HXYZ9ABCDEF1234567890",
      "clientName": "runtype-sdk-python",
      "clientVersion": "1.4.2",
      "completedAt": "2024-11-15T10:32:45Z",
      "createdAt": "2024-11-15T10:28:00Z",
      "error": null,
      "id": "task_01HXYZ9ABCDEF7654321098",
      "instruction": "Analyze the latest sales report and create a summary with key metrics and trends for Q3 2024.",
      "lastEventSeq": 42,
      "modelRoundCount": 5,
      "organizationId": "org_01HXYZ9ABCDEF0987654321",
      "question": null,
      "result": {
        "links": [
          {
            "label": "Q3 2024 Sales Report",
            "url": "https://app.runtype.com/reports/q3-2024-sales-summary"
          }
        ],
        "modelRoundCount": 5,
        "summary": "Analyzed Q3 2024 sales data. Total revenue increased by 18% YoY to $4.2M. Top performing product category was Enterprise licenses. Identified 3 key growth opportunities in APAC region.",
        "toolCallCount": 12,
        "touchedEntities": [
          {
            "action": "read",
            "id": "report_q3_2024_sales",
            "kind": "Report",
            "name": "Q3 2024 Sales Report"
          }
        ],
        "totalCost": 0.0842,
        "warnings": [
          "Some data points from September were incomplete and may affect accuracy."
        ]
      },
      "startedAt": "2024-11-15T10:28:05Z",
      "status": "completed",
      "summary": "Analyzed Q3 2024 sales data and generated a summary report with key metrics.",
      "toolCallCount": 12,
      "totalCost": 0.0842,
      "touchedEntities": [
        {
          "action": "read",
          "id": "report_q3_2024_sales",
          "kind": "Report",
          "name": "Q3 2024 Sales Report"
        }
      ],
      "updatedAt": "2024-11-15T10:32:45Z",
      "userId": "user_01HXYZ9ABCDEF1122334455"
    }
  ],
  "pagination": {
    "currentOffset": 0,
    "hasMore": true,
    "hasPrev": false,
    "limit": 20,
    "nextCursor": "cursor_01HXYZ9ABCDEF9988776655",
    "prevCursor": null,
    "currentPage": 1,
    "totalCount": 87,
    "totalPages": 5
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/delegate-tasks"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/delegate-tasks';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.runtype.com/v1/delegate-tasks"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.runtype.com/v1/delegate-tasks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.runtype.com/v1/delegate-tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.runtype.com/v1/delegate-tasks', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/delegate-tasks");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/delegate-tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```