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

# List all workflows

GET https://api.scoutos.com/v2/workflows

List all workflows in the organization

Reference: https://ref.scoutos.com/api-sdk/endpoints/workflows/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `sort` (string, optional, nullable) — Field to sort by
- `direction` (string, optional, nullable) — Sort in ascending or descending order
- `start_at` (string, optional, nullable) — created_at to start at
- `limit` (integer, optional, nullable, default: 12) — Limit of records to return
- `query` (string, optional, nullable) — Search query
- `tags` (string, optional, nullable) — Filter by tags
- `drive` (boolean, optional, default: false)

## Response

### 200

Successful Response

- `data` (list of Workflow, required)
- `has_more` (boolean, required)
- `next_cursor` (datetime, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### Workflow

- `workflow_config` (WorkflowConfig-Output, required)
- `last_updated_at` (datetime, required)
- `created_at` (datetime, required)
- `created_by` (Identity, required)
- `last_updated_by` (Identity, required)
- `revision_id` (string, required)
- `workflow_id` (string, required)
- `workflow_key` (string, optional, nullable)
- `is_draft` (boolean, optional, default: false)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### WorkflowConfig-Output

- `workflow_display_name` (string, optional, default: Untitled)
- `workflow_schema_version` (string, optional, default: 1.0)
- `workflow_img_url` (string, optional, nullable)
- `workflow_description` (string, optional, nullable)
- `blocks` (list of Block-Output, optional)
- `notes` (list of WorkflowNote-Output, optional)
- `placeholders` (list of Placeholder-Output, optional)
- `tags` (list of string, optional)
- `is_tool` (boolean, optional, default: false)

### Identity

- `type` (enum, required)
  - Allowed values: `user`, `api_key`, `system`
- `details` (IdentityDetails, required)

### ValidationErrorLocItems

- string
- integer

### Block-Output

- `block_archetype_id` (string, required)
- `block_display_name` (string, required)
- `block_id` (string, required)
- `block_inputs` (BlockOutputBlockInputs, optional)
- `is_output` (boolean, optional, default: false)
- `dependencies` (list of Dependency, optional)
- `input_schema` (BlockOutputInputSchema, optional)
- `ui` (NodeUI, optional)
- `trigger_config` (BlockOutputTriggerConfig, optional, nullable)
- `ignore_error` (boolean, optional, default: false) — If true, will continue down the branch of the failed block
- `block_config` (list of BlockOutputBlockConfigItems, optional, deprecated)
- `output_schema` (list of any, optional, deprecated)

### WorkflowNote-Output

- `id` (string, required)
- `bgColor` (string, required)
- `content` (string, optional, default: )
- `author` (string, optional, default: Your name)
- `ui` (NodeUI, optional)

### Placeholder-Output

- `block_id` (string, required)
- `type` (enum, required)
  - Allowed values: `triggerPlaceholder`, `blockPlaceholder`
- `ui` (NodeUI, optional)
- `dependencies` (list of Dependency, optional)

### IdentityDetails

- UserIdentity: UserIdentity
- ApiKeyIdentity: ApiKeyIdentity

### BlockOutputBlockInputs

### Dependency

- `block_id` (string, required)
- `ui` (EdgeUI, optional)

### BlockOutputInputSchema

### NodeUI

- `dimensions` (Dimensions, optional, nullable)
- `position` (Position, optional, nullable)

### BlockOutputTriggerConfig

### BlockOutputBlockConfigItems

- BlockConfigItemBoolean: BlockConfigItemBoolean
- BlockConfigItemJson: BlockConfigItemJson
- BlockConfigItemNumber: BlockConfigItemNumber
- BlockConfigItemSelect: BlockConfigItemSelect
- BlockConfigItemTextShort: BlockConfigItemTextShort
- BlockConfigItemTextLong: BlockConfigItemTextLong
- BlockConfigItemLlm: BlockConfigItemLlm

### UserIdentity

- `user_id` (string, required)
- `org_id` (string, required)
- `scout_organization_id` (string, required)
- `email` (UserIdentityEmail, required)

### ApiKeyIdentity

- `api_key` (ApiKeyIdentityApiKey, optional)

### EdgeUI

- `edge_type` (string, optional, default: plusSign)

### Dimensions

- `width` (integer, required)
- `height` (integer, required)

### Position

- `x` (integer, required)
- `y` (integer, required)

### BlockConfigItemBoolean

- `id` (string, required)
- `display_name` (string, required)
- `type` (enum, optional, default: boolean)
  - Allowed values: `boolean`
- `default_value` (boolean, optional, nullable)
- `value` (boolean, optional, nullable)

### BlockConfigItemJson

- `id` (string, required)
- `display_name` (string, required)
- `type` (enum, optional, default: json)
  - Allowed values: `json`
- `default_value` (string, optional, nullable)
- `value` (string, optional, nullable)

### BlockConfigItemNumber

- `id` (string, required)
- `display_name` (string, required)
- `type` (enum, optional, default: number)
  - Allowed values: `number`
- `default_value` (BlockConfigItemNumberDefaultValue, optional, nullable)
- `minimum_value` (BlockConfigItemNumberMinimumValue, optional, nullable)
- `maximum_value` (BlockConfigItemNumberMaximumValue, optional, nullable)
- `value` (BlockConfigItemNumberValue, optional, nullable)

### BlockConfigItemSelect

- `id` (string, required)
- `display_name` (string, required)
- `options` (list of SelectOptionItem, required)
- `type` (enum, optional, default: select)
  - Allowed values: `select`
- `selected_option` (integer, optional, nullable)
- `value` (string, optional, nullable)

### BlockConfigItemTextShort

- `id` (string, required)
- `display_name` (string, required)
- `type` (enum, optional, default: text-short)
  - Allowed values: `text-short`
- `default_value` (string, optional, nullable)
- `value` (string, optional, nullable)

### BlockConfigItemTextLong

- `id` (string, required)
- `display_name` (string, required)
- `type` (enum, optional, default: text-long)
  - Allowed values: `text-long`
- `default_value` (string, optional, nullable)
- `value` (BlockConfigItemTextLongValue, optional, nullable)

### BlockConfigItemLlm

- `id` (string, required)
- `display_name` (string, required)
- `type` (enum, optional, default: prompt)
  - Allowed values: `prompt`
- `value` (list of Prompt, optional, nullable)

### UserIdentityEmail

### ApiKeyIdentityApiKey

### BlockConfigItemNumberDefaultValue

- integer
- double

### BlockConfigItemNumberMinimumValue

- integer
- double

### BlockConfigItemNumberMaximumValue

- integer
- double

### BlockConfigItemNumberValue

- integer
- double

### SelectOptionItem

- `name` (string, required)
- `id` (string, optional)
- `color_hex` (string, optional, nullable)

### BlockConfigItemTextLongValue

- string
- BlockConfigItemTextLongValue1: list of Prompt

### Prompt

- `id` (string, required)
- `role` (enum, required)
  - Allowed values: `assistant`, `user`, `system`
- `content` (string, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "workflow_config": {
        "workflow_display_name": "Customer Onboarding",
        "workflow_schema_version": "1.0",
        "workflow_img_url": "https://cdn.scoutos.com/workflows/onboarding.png",
        "workflow_description": "Automated workflow for onboarding new customers",
        "blocks": [
          {
            "block_archetype_id": "email_sender",
            "block_display_name": "Welcome Email Block",
            "block_id": "block_001",
            "block_inputs": {
              "recipient_email": "newuser@example.com",
              "email_subject": "Welcome to Our Service"
            },
            "is_output": false,
            "dependencies": [
              {
                "block_id": "block_000",
                "ui": {
                  "edge_type": "plusSign"
                }
              }
            ],
            "input_schema": {
              "recipient_email": "string",
              "email_subject": "string"
            },
            "ui": {
              "dimensions": {
                "width": 300,
                "height": 150
              },
              "position": {
                "x": 100,
                "y": 200
              }
            },
            "trigger_config": {},
            "ignore_error": false,
            "block_config": [
              {
                "id": "send_welcome_email",
                "display_name": "Send Welcome Email",
                "type": "boolean",
                "default_value": true,
                "value": true
              }
            ],
            "output_schema": [
              null
            ]
          }
        ],
        "notes": [
          {
            "id": "note_001",
            "bgColor": "#FFFAE5",
            "content": "Ensure email templates are updated quarterly.",
            "author": "Jane Doe",
            "ui": {
              "dimensions": {
                "width": 200,
                "height": 100
              },
              "position": {
                "x": 400,
                "y": 100
              }
            }
          }
        ],
        "placeholders": [
          {
            "block_id": "block_002",
            "type": "triggerPlaceholder",
            "ui": {
              "dimensions": {
                "width": 100,
                "height": 50
              },
              "position": {
                "x": 50,
                "y": 50
              }
            },
            "dependencies": [
              {
                "block_id": "block_001",
                "ui": {
                  "edge_type": "plusSign"
                }
              }
            ]
          }
        ],
        "tags": [
          "onboarding",
          "email",
          "automation"
        ],
        "is_tool": false
      },
      "last_updated_at": "2024-04-10T14:45:00Z",
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": {
        "type": "user",
        "details": {
          "user_id": "user_12345",
          "org_id": "org_67890",
          "scout_organization_id": "scout_org_001",
          "email": {
            "work": "jane.doe@scoutos.com"
          }
        }
      },
      "last_updated_by": {
        "type": "user",
        "details": {
          "user_id": "user_12345",
          "org_id": "org_67890",
          "scout_organization_id": "scout_org_001",
          "email": {
            "work": "jane.doe@scoutos.com"
          }
        }
      },
      "revision_id": "rev_20240410_01",
      "workflow_id": "wf_0001",
      "workflow_key": "customer_onboarding_v1",
      "is_draft": false
    }
  ],
  "has_more": true,
  "next_cursor": "2024-04-10T14:45:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.scoutos.com/v2/workflows"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```typescript
import { ScoutClient } from "scoutos";

const client = new ScoutClient({ apiKey: "YOUR_API_KEY" });
await client.workflows.list({
    sort: "sort",
    direction: "direction",
    start_at: "start_at",
    limit: 1,
    query: "query",
    tags: "tags",
    drive: true
});

```

```go
package main

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

func main() {

	url := "https://api.scoutos.com/v2/workflows"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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.scoutos.com/v2/workflows")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.scoutos.com/v2/workflows")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.scoutos.com/v2/workflows', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.scoutos.com/v2/workflows");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.scoutos.com/v2/workflows")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```