# flow2act · Publish a flow

Publish the saved draft revision. Existing executions keep their original version.

Use draft.publishedVersionId for new runs. Live publication requires a complete business profile and explicit activation; otherwise 409 ORGANIZATION_NOT_LIVE. Both publication APIs enforce this rule. Sandbox publication stays available. Publishing consumes no process quota and starts no execution.

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

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 1 · max 9007199254740991

## Request example (replace example IDs)

```sh
curl -X POST "https://api.flow2act.com/v1/flows/10000000-0000-4000-8000-000000000002/publish" \
  -H "authorization: Bearer $FLOW2ACT_API_KEY" \
  -H "x-organization-id: 10000000-0000-4000-8000-000000000001" \
  -H "idempotency-key: example-publish-flow-001" \
  -H "content-type: application/json" \
  --data-raw '{
  "revision": 1
}'
```

## Response excerpt

```json
{
  "id": "10000000-0000-4000-8000-000000000002",
  "draft": {
    "publishedVersionId": "10000000-0000-4000-8000-000000000003",
    "publishedRevision": 1
  }
}
```

Source: /docs/publish-flow
Full schemas: /docs/openapi.json
