# Run a published workflow by hand

Fires a published workflow NOW against one record: it does real work — edits records, sends messages — acting with the seat of whoever published it. Body: optional `definitionKey` (the page, e.g. `deals`) and `rowId` (the record it is about). It QUEUES the run and answers it; the worker executes, so follow it with `get_workflows_runs_id`. A draft is refused with 422 — publish it first. Nothing here is a dry run; `post_workflows_validate` is the one that only looks.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workflows/{id}/run`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "definitionKey": "string",
    "rowId": ""
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "run": {
      "claimedAt": "string",
      "claimedBy": "string",
      "context": "string",
      "createdAt": "string",
      "cursorStep": 1,
      "errorText": "string",
      "finishedAt": "string",
      "id": 1,
      "nextAttemptAt": "string",
      "startedAt": "string",
      "status": "string",
      "subjectDefinitionId": "",
      "subjectRowId": "",
      "triggerActivityId": 1,
      "triggerKind": "string",
      "updatedAt": "string",
      "version": 1,
      "versionId": 1,
      "workflowId": 1,
      "workflowKey": "string",
      "workflowName": "string"
    }
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
