# Manage Workflows

[Roboflow Workflows](https://docs.roboflow.com/workflows/create-a-workflow) are visual computer-vision pipelines you can build in the web app and deploy as a hosted endpoint. The REST API exposes the management surface; for executing a workflow against an image or video stream, see [Run a Model on an Image](/developer/rest-api/run-a-model-on-an-image.md) and the [Workflows runtime docs](https://docs.roboflow.com/workflows/deploy-a-workflow).

`api_key` may be passed as a query parameter or in the request body. Required scopes are noted on each endpoint.

## List Workflows

<mark style="color:green;">`GET`</mark> `/:workspace/workflows`

Lists all workflows in the workspace.

**Query**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>api_key</code></td><td>string</td><td>API key for the workspace.</td><td>true</td></tr></tbody></table>

**Example Request**

```bash
curl "https://api.roboflow.com/my-workspace/workflows?api_key=$ROBOFLOW_API_KEY"
```

**Response**

```json
{
  "workflows": [
    {
      "id": "wf_abc123",
      "name": "Slow webhooks",
      "url": "slow-webhooks",
      "createdAt": "2026-04-12T17:05:33.000Z"
    }
  ],
  "status": "ok"
}
```

Required scope: `workflow:read`.

## Get a Workflow

<mark style="color:green;">`GET`</mark> `/:workspace/workflows/:workflowUrl`

Returns the workflow's specification, metadata, and (for non-public workflows) authorization status.

```bash
curl "https://api.roboflow.com/my-workspace/workflows/slow-webhooks?api_key=$ROBOFLOW_API_KEY"
```

Public workflows can be accessed without an `api_key`. Private workflows require the `workflow:read` scope.

## List Workflow Versions

<mark style="color:green;">`GET`</mark> `/:workspace/workflows/:workflowUrl/versions`

```bash
curl "https://api.roboflow.com/my-workspace/workflows/slow-webhooks/versions?api_key=$ROBOFLOW_API_KEY"
```

Returns the versioned snapshots of the workflow specification.

## Create a Workflow

<mark style="color:green;">`POST`</mark> `/:workspace/createWorkflow`

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Query**

<table><thead><tr><th width="180">Name</th><th width="140">Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>api_key</code></td><td>string</td><td>Workspace API key.</td><td>true</td></tr><tr><td><code>name</code></td><td>string</td><td>Display name.</td><td>true</td></tr><tr><td><code>url</code></td><td>string</td><td>URL slug for the workflow. Auto-generated from <code>name</code> if omitted.</td><td>true</td></tr><tr><td><code>config</code></td><td>string</td><td>JSON-encoded workflow specification (see note below).</td><td>true</td></tr><tr><td><code>template</code></td><td>string</td><td>JSON-encoded template metadata. Pass <code>"{}"</code> if you don't have one.</td><td>true</td></tr></tbody></table>

**Note on `config`**: the API expects the stored shape `{"specification": {...}}`. Passing a bare specification works through the SDK adapter, which auto-wraps it; for direct REST calls, wrap it yourself.

**Example Request**

```bash
curl -X POST "https://api.roboflow.com/my-workspace/createWorkflow" \
  --get \
  --data-urlencode "api_key=$ROBOFLOW_API_KEY" \
  --data-urlencode "name=My Workflow" \
  --data-urlencode "url=my-workflow" \
  --data-urlencode 'config={"specification":{"version":"1.0","inputs":[],"steps":[],"outputs":[]}}' \
  --data-urlencode 'template={}'
```

**Response**

```json
{
  "workflows": { "id": "wf_xyz789", "url": "my-workflow" },
  "status": "ok"
}
```

Required scope: `workflow:create`.

## Update a Workflow

<mark style="color:green;">`POST`</mark> `/:workspace/updateWorkflow`

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>Workflow's internal ID.</td><td>true</td></tr><tr><td><code>name</code></td><td>string</td><td>Display name.</td><td>true</td></tr><tr><td><code>url</code></td><td>string</td><td>URL slug.</td><td>true</td></tr><tr><td><code>config</code></td><td>string</td><td>JSON-encoded workflow specification (see note on Create).</td><td>true</td></tr></tbody></table>

```bash
curl -X POST "https://api.roboflow.com/my-workspace/updateWorkflow?api_key=$ROBOFLOW_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"id":"wf_xyz789","name":"My Workflow","url":"my-workflow","config":"{\"specification\":{\"version\":\"1.0\",\"steps\":[]}}"}'
```

Required scope: `workflow:update`.

## Fork a Workflow

<mark style="color:green;">`POST`</mark> `/:workspace/forkWorkflow`

Copy a workflow from another workspace into this one.

**Body**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>source_workspace</code></td><td>string</td><td>Slug of the workspace that owns the source workflow.</td><td>true</td></tr><tr><td><code>source_workflow</code></td><td>string</td><td>URL slug of the source workflow.</td><td>true</td></tr><tr><td><code>name</code></td><td>string</td><td>Display name for the fork. Defaults to source name.</td><td>false</td></tr><tr><td><code>url</code></td><td>string</td><td>URL slug for the fork. Auto-generated if omitted.</td><td>false</td></tr></tbody></table>

```bash
curl -X POST "https://api.roboflow.com/my-workspace/forkWorkflow?api_key=$ROBOFLOW_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"source_workspace":"other-workspace","source_workflow":"their-workflow","name":"My Fork","url":"my-fork"}'
```

Required scope: `workflow:create`.

## Generate a Workflow Token

<mark style="color:green;">`POST`</mark> `/:workspace/workflowToken`

Generate a short-lived token suitable for executing a workflow from a public client (e.g. a browser).

```bash
curl -X POST "https://api.roboflow.com/my-workspace/workflowToken?api_key=$ROBOFLOW_API_KEY"
```

## Delete (soft-delete) a Workflow

<mark style="color:red;">`DELETE`</mark> `/:workspace/workflows/:workflowUrl`

Moves the workflow to Trash. See [Manage Trash](/developer/rest-api/manage-trash.md#delete-a-workflow) for the response shape and restore flow.

## Run a Workflow

Workflow execution lives at `https://serverless.roboflow.com`, not the management API. See [Run a Model on an Image](/developer/rest-api/run-a-model-on-an-image.md) and the product docs on [deploying a workflow](https://docs.roboflow.com/workflows/deploy-a-workflow).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/developer/rest-api/manage-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
