# Require human approval for a workflow's sends

`PUT /v1/workflows/{id}/send-approval`

- Authentication: required (Bearer token)
- Required scope: `api.workflows.manage`

Turns the send-approval gate ON. While it is on, a run reaching a `send`
step parks awaiting review instead of sending, and a person approves,
skips or cancels each batch in the SendOps dashboard. On writes `{id}`
resolves as a UUID or, failing that, as the workflow's org-unique key.

**One direction only.** `enabled: true` succeeds. `enabled: false` is
refused with `403` and code `send_approval_dashboard_only`, on this API
and on the MCP surface alike: the gate is what stands between an
automated journey and unreviewed mail leaving your SES account, and a
credential that could clear it could send on its own authority. A person
turns it off in the dashboard, or nobody does. An omitted `enabled` is a
`422` rather than a silent `false`.

Operational, not an edit: it does not bump the version, change the
content hash, or re-validate the source.

## Path parameters

- `id` (string, required) — The workflow's UUID or, when the value does not parse as a UUID, its org-unique key. Unknown handles read as `404 not_found`. Accepted on every workflow route, read and write alike.

## Request body

Content type: `application/json`

```json
{
  "enabled": true
}
```

## Example request

```bash
curl -X PUT 'https://api.sendops.dev/v1/workflows/string/send-approval' \
  -H "Authorization: Bearer $SENDOPS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true}'
```

## Responses

### 200 — The workflow with the gate on

Content type: `application/json`

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "key": "string",
  "description": "string",
  "status": "string",
  "invalid_reason": "string",
  "require_send_approval": true,
  "send_mode": "live",
  "shadow_started_at": "2026-05-17T20:00:00Z",
  "shadow_cohort_list_id": "00000000-0000-0000-0000-000000000000",
  "shadow_cohort": {
    "id": "00000000-0000-0000-0000-000000000000",
    "key": "string",
    "name": "string",
    "member_count": 0
  },
  "current_version": 0,
  "run_counts": {},
  "created_at": "2026-05-17T20:00:00Z",
  "updated_at": "2026-05-17T20:00:00Z",
  "source": "string",
  "content_hash": "string",
  "warnings": [
    "string"
  ],
  "diagnostics": [
    {
      "line": 0,
      "column": 0,
      "severity": "string",
      "message": "string"
    }
  ],
  "requires": [
    {
      "kind": "template",
      "key": "string",
      "status": "ok",
      "detail": "string",
      "fix": "string"
    }
  ]
}
```

### 401 — Missing, malformed, or unknown API key

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 403 — Either the credential lacks `api.workflows.manage`
(`invalid_scope`), or the request asked to DISABLE send approval,
which no API or MCP credential may do
(`send_approval_dashboard_only`).

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 404 — Resource not found

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 422 — A query parameter, path value or body field failed validation.

The body is a `validation_failed` Problem. When the refusal is about a
reference — a segment key, template slug, topic or attribute name the
organization does not have — it additionally carries `validation_code`,
`field`, `line`/`column`, `missing`, `candidates` and `next_step`, so a
client can correct the call without a second round of guessing. See
`ValidationProblem`.

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ],
  "validation_code": "invalid_syntax",
  "field": "string",
  "line": 0,
  "column": 0,
  "missing": [
    {
      "kind": "segment",
      "key": "string"
    }
  ],
  "candidates": {},
  "next_step": "string"
}
```

### 429 — Per-org rate limit exceeded

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```

### 500 — Unexpected server-side failure. The `code` is `internal_error`. The
`request_id` field can be quoted to SendOps support to investigate.

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ],
  "attribute_id": "00000000-0000-0000-0000-000000000000",
  "content_hash": "string",
  "differs": [
    "string"
  ]
}
```
