# flow2act · Update a draft

Save the full designer document with its current revision. Stale writes return 409.



## POST /v1/flows/{flowId}/draft

Authentication: restricted integration key (scope: flows:write) or flow2act sign-in access token
Required tenant header: X-Organization-Id.
Required user permissions: Administrator or Sandbox developer required. The API checks current membership, roles, key scopes and resource permissions on every request. Documentation visibility grants no access.

## Input parameters
- revision (integer, required): min 0 · max 9007199254740991
- document (object, required): 

## Request example (replace example IDs)

```sh
curl -X POST "https://api.flow2act.com/v1/flows/10000000-0000-4000-8000-000000000002/draft" \
  -H "authorization: Bearer $FLOW2ACT_API_KEY" \
  -H "x-organization-id: 10000000-0000-4000-8000-000000000001" \
  -H "idempotency-key: example-save-draft-001" \
  -H "content-type: application/json" \
  --data-raw '{
  "revision": 1,
  "document": {
    "name": "Deployment approval",
    "definition": {
      "schemaVersion": 2,
      "fields": [
        {
          "key": "environment",
          "label": "Environment",
          "type": "select",
          "required": true,
          "options": [
            "staging",
            "production"
          ],
          "min": null,
          "max": null
        }
      ],
      "nodes": [
        {
          "id": "start",
          "type": "start",
          "label": "Request received",
          "next": "approval"
        },
        {
          "id": "approval",
          "type": "approval",
          "label": "Operations approval",
          "groupId": "10000000-0000-4000-8000-000000000009",
          "next": "end"
        },
        {
          "id": "end",
          "type": "end",
          "label": "Approved",
          "outcome": "approved"
        }
      ]
    },
    "presentation": {
      "names": {
        "api": "Request",
        "amount": "Condition",
        "end": "Complete"
      },
      "description": "Operations approves a deployment.",
      "positions": {}
    }
  }
}'
```

## Response excerpt

```json
{
  "id": "10000000-0000-4000-8000-000000000002",
  "draft": {
    "revision": 2
  }
}
```

Source: /docs/save-draft
Full schemas: /docs/openapi.json
