> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attaxr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Reusable tool plans you can run as scans.

A workflow is a named tool plan. Reuse one across scans instead of repeating
`workflowSteps` on every create call.

## Create and edit

`POST /api/workflows` stores a workflow:

```json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
{
  "name": "Weekly web sweep",
  "description": "Crawl and fingerprint the web surface",
  "goals": "Map login and account flows",
  "steps": [{ "tool": "katana", "args": ["-d", "3"] }]
}
```

The request needs only `name`. The server sets `userId` and `createdAt`. The
request body cannot override them. `PUT /api/workflows/{id}` applies a
partial update. `DELETE /api/workflows/{id}` removes the workflow.

## Run

`POST /api/workflows/{id}/run` queues a scan that uses the workflow's plan:

```json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
{ "goals": "Find login and account pages" }
```

`goals` is optional. The response returns `202` while the scan queues, `404`
for an unknown workflow.

## List

`GET /api/workflows` returns the paginated list. `?q=` searches by name.
