# Get Workflow

`GET /workflows/{wflId}` · Core · Compute & Automation

Retrieves the full definition of a single workflow by its `wfl_<base62>` identifier, including its trigger configuration, actions chain, and current status. Accessible to all Forge, Studio, and Workspace cohort roles subject to RLS. Returns `K9O_WORKFLOW_NOT_FOUND` (404) if the workflow does not exist in the project.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `wflId` | path | yes | The workflow id (`wfl_...`). Example: `"wfl_demo00000001"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | A workflow: what starts it, its steps and its status. |
| `data.id` | string | yes | The workflow id (`wfl_...`). |
| `data.projectId` | string | yes | The project the workflow belongs to (`proj_...`). |
| `data.name` | string | yes | The workflow's name. |
| `data.description` | string | yes | What the workflow does. Empty when none was given. |
| `data.status` | enum ("active", "archived", "draft") | yes | `draft` never runs. `active` runs when its trigger fires and must have at least one step. `archived` is kept but never runs. |
| `data.triggerType` | enum ("view_row_event", "form_submission", "scheduled", "manual", "webhook") | yes | What starts a run. |
| `data.triggerConfig` | object | yes | The trigger's settings, an object. Its shape depends on `triggerType`: - `manual`: `{}`. - `webhook`: `{signatureScheme?}`; the only scheme is `hmac-sha256`. Don't send a secret: the platform generates one and returns it once, as `webhookSecret`. - `scheduled`: `{scheduleExpression, timezone?}`: a 5-field cron expression or alias, at least 5 minutes apart, read in an IANA time zone (default UTC). - `form_submission`: `{extensionId, formId, collection, statuses?}` for an extension's form, or `{publicationId}` for a published form. The webhook signing secret is never part of it. |
| `data.actions` | array of object | yes | The steps, in order. |
| `data.actions.[]index` | integer | yes | The step's position in the chain, from 0. |
| `data.actions.[]action_type` | string | yes | What the step does: `write_collection`, `read_collection`, `invoke_function`, `invoke_extension`, `llm_inference`, `send_notification`, `http_request`, `approval_step` or `branch`. |
| `data.actions.[]config` | object | yes | The step's settings. Their shape depends on `action_type`: - `write_collection`: `{collection, op, payload?, filter?}`. `op` is `insert`, `update` or `delete`; `payload` maps columns to values; `filter` maps columns to `<operator>.<value>` strings, such as `{"id": "eq.{{trigger.id}}"}`. - `read_collection`: `{collection, filter?, select?, order?, limit}`. - `invoke_function`: `{functionName, payload?}`. - `invoke_extension`: `{extensionSlug, action, payload?}`. The payload must fit the action's declared config schema. - `llm_inference`: `{model, prompt, maxTokens?, temperature?}`. - `send_notification`: `{channel, recipient, payload?}`, with `channel` `email` or `webhook`. - `http_request`: `{url, method, headers?, query?, body?}`. A `GET` takes no `body`. - `approval_step`: `{approverResolver, resolverConfig, timeoutSecondsBeforeAutoFail?}`, with `approverResolver` `role`, `group` or `explicit_users`. The run waits for the approvers; a timeout fails the run. - `branch`: `{condition, true_branch, false_branch}`, two nested step lists, up to 3 levels deep. `{{...}}` templates fill values from the trigger and earlier steps; keys, collection names and operators are always literal. |
| `data.actions.[]retry` | object | no | The step's retry settings, `{maxAttempts, backoffStrategy?}`, when set. |
| `data.actions.[]condition` | object | no | The predicate that decides whether the step runs, when set. |
| `data.actions.[]parallel` | boolean | no | Whether the step runs alongside adjacent parallel steps, when set. |
| `data.rbacBinding` | object | yes | Free-form access metadata stored with the workflow and returned as sent. Default `{}`. |
| `data.authoredBy` | string | yes | Who created the workflow (`usr_...`). |
| `data.authoredAt` | string (date-time) | yes | When the workflow was created. |
| `data.updatedBy` | string | yes | Who last changed the workflow (`usr_...`). |
| `data.updatedAt` | string (date-time) | yes | When the workflow last changed. |
| `meta` | object | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_INVALID_CREDENTIALS` | The request was made without a valid session or bearer token. |
| 401 | `K9O_SESSION_EXPIRED` | Your session has expired; re-authenticate and retry. |
| 403 | `K9O_ACCESS_DENIED` | Your role does not include any Forge, Studio, or Workspace cohort permission required to read this workflow. |
| 404 | `K9O_WORKFLOW_NOT_FOUND` | No workflow with the supplied ID exists in this project. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/workflows/wfl_demo00000001' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/workflows/wfl_demo00000001', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.studio.workflows.read('wfl_demo00000001')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.studio.workflows.read("wfl_demo00000001")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Studio.Workflows.Read(ctx, "wfl_demo00000001")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.studio.workflows.read("wfl_demo00000001").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.studio().workflows().read("wfl_demo00000001")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Studio.Workflows.ReadAsync("wfl_demo00000001")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.studio.workflows.read("wfl_demo00000001")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->studio->workflows->read('wfl_demo00000001')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/get-workflow
