# polymorfa flow

> Manage project Flow drafts and their Official API lifecycle.

## Commands

- [polymorfa flow create](https://docs.polymorfa.com/cli/flow/create): Create a local project Flow draft. Requires sessions:manage.
- [polymorfa flow delete](https://docs.polymorfa.com/cli/flow/delete): Delete a local Flow draft. Requires sessions:manage.
- [polymorfa flow deprecate](https://docs.polymorfa.com/cli/flow/deprecate): Deprecate a published WhatsApp Flow (beta). Requires sessions:manage.
- [polymorfa flow discard](https://docs.polymorfa.com/cli/flow/discard): Delete a draft from WhatsApp (beta). Requires sessions:manage.
- [polymorfa flow endpoint delete](https://docs.polymorfa.com/cli/flow/endpoint-delete): Remove a Flow's data endpoint on one Number (beta). WhatsApp requests to it are refused afterwards; receipts are kept. Requires sessions:manage.
- [polymorfa flow endpoint get](https://docs.polymorfa.com/cli/flow/endpoint-get): Read a Flow's data endpoint on one Number and the Number's encryption custody (beta). Requires sessions:read.
- [polymorfa flow endpoint receipts](https://docs.polymorfa.com/cli/flow/endpoint-receipts): Read a Flow's data-exchange receipts, newest first (beta). Metadata only: no form data, Flow token or response. Requires sessions:read.
- [polymorfa flow endpoint set](https://docs.polymorfa.com/cli/flow/endpoint-set): Create or replace a Flow's data endpoint on one Number (beta). Requires sessions:manage. forward and function need a Polymorfa-managed key; direct needs your own key. A forward signing secret is printed once. Makes one attempt.
- [polymorfa flow get](https://docs.polymorfa.com/cli/flow/get): Read a project Flow draft. Requires sessions:read.
- [polymorfa flow key custody](https://docs.polymorfa.com/cli/flow/key-custody): Read whether Polymorfa holds a Number's Flow encryption key (managed) or not (customer), and recent managed keys (beta). Requires sessions:read.
- [polymorfa flow key get](https://docs.polymorfa.com/cli/flow/key-get): Read the public Flow encryption key registered to a Meta phone number. Requires sessions:read.
- [polymorfa flow key register](https://docs.polymorfa.com/cli/flow/key-register): Replace the public key used by every dynamic Flow on this Meta phone number. Requires sessions:manage; retain the matching private key on your endpoint.
- [polymorfa flow key rotate](https://docs.polymorfa.com/cli/flow/key-rotate): Generate and register a new Polymorfa-managed Flow encryption key for a Number (beta). Every dynamic Flow on the Number uses it; the previous managed key decrypts for 24 hours. Requires sessions:manage. Makes one attempt.
- [polymorfa flow list](https://docs.polymorfa.com/cli/flow/list): List project Flow drafts. Requires sessions:read.
- [polymorfa flow publish](https://docs.polymorfa.com/cli/flow/publish): Publish a validated Flow to WhatsApp (beta). Requires sessions:manage.
- [polymorfa flow receipts](https://docs.polymorfa.com/cli/flow/receipts): Read provider operation receipts, including uncertain outcomes. Requires sessions:read.
- [polymorfa flow sync](https://docs.polymorfa.com/cli/flow/sync): Reconcile provider status without replaying uncertain writes (beta). Requires sessions:manage.
- [polymorfa flow update](https://docs.polymorfa.com/cli/flow/update): Update a local project Flow draft. Requires sessions:manage.
- [polymorfa flow upload](https://docs.polymorfa.com/cli/flow/upload): Upload the Flow to one Number (beta). Requires sessions:manage. Does not retry uncertain writes.

## polymorfa flow create

Create a local project Flow draft. Requires sessions:manage.

### Usage

```bash
polymorfa flow create [flags]
```

### Flags

- `--input <value>` (value, required). JSON file or - for stdin. Project and path identity come from command flags.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow delete

Delete a local Flow draft. Requires sessions:manage.

### Usage

```bash
polymorfa flow delete FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--yes` (boolean, required). Confirm this Flow change.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow deprecate

Deprecate a published WhatsApp Flow (beta). Requires sessions:manage.

### Usage

```bash
polymorfa flow deprecate FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--request-id <value>` (value). UUID for this exact provider operation. Reuse to inspect the original receipt.
- `--session <value>` (value, required). Number name or ID in the same project.
- `--yes` (boolean, required). Confirm this Flow change.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow discard

Delete a draft from WhatsApp (beta). Requires sessions:manage.

### Usage

```bash
polymorfa flow discard FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--request-id <value>` (value). UUID for this exact provider operation. Reuse to inspect the original receipt.
- `--session <value>` (value, required). Number name or ID in the same project.
- `--yes` (boolean, required). Confirm this Flow change.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow endpoint delete

Remove a Flow's data endpoint on one Number (beta). WhatsApp requests to it are refused afterwards; receipts are kept. Requires sessions:manage.

### Usage

```bash
polymorfa flow endpoint delete FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--session <value>` (value, required). Number name or ID in the same project.
- `--yes` (boolean). Confirm removing the endpoint.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow endpoint get

Read a Flow's data endpoint on one Number and the Number's encryption custody (beta). Requires sessions:read.

### Usage

```bash
polymorfa flow endpoint get FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--session <value>` (value, required). Number name or ID in the same project.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow endpoint receipts

Read a Flow's data-exchange receipts, newest first (beta). Metadata only: no form data, Flow token or response. Requires sessions:read.

### Usage

```bash
polymorfa flow endpoint receipts FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--limit <value>` (value). 1 to 100 receipts.
- `--session <value>` (value). Only this Number (name or ID).

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow endpoint set

Create or replace a Flow's data endpoint on one Number (beta). Requires sessions:manage. forward and function need a Polymorfa-managed key; direct needs your own key. A forward signing secret is printed once. Makes one attempt.

### Usage

```bash
polymorfa flow endpoint set FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--deployment <value>` (value). Pin an immutable Function deployment UUID.
- `--disabled` (boolean). Save the endpoint disabled; WhatsApp requests are refused.
- `--expected-revision <value>` (value). Replace only when the stored revision matches.
- `--function <value>` (value). Function UUID for function mode.
- `--mode <value>` (value, required). forward: Polymorfa decrypts and forwards signed JSON to --url. function: runs --function. direct: WhatsApp calls --url with your own key. Values: `forward`, `function`, `direct`.
- `--rotate-signing-secret` (boolean). Issue a new forward signing secret.
- `--session <value>` (value, required). Number name or ID in the same project.
- `--url <value>` (value). HTTPS URL for forward or direct.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow get

Read a project Flow draft. Requires sessions:read.

### Usage

```bash
polymorfa flow get FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow key custody

Read whether Polymorfa holds a Number's Flow encryption key (managed) or not (customer), and recent managed keys (beta). Requires sessions:read.

### Usage

```bash
polymorfa flow key custody [flags]
```

### Flags

- `--session <value>` (value, required). Number name or ID in the project.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow key get

Read the public Flow encryption key registered to a Meta phone number. Requires sessions:read.

### Usage

```bash
polymorfa flow key get [flags]
```

### Flags

- `--graph-version <value>` (value, required). Meta Graph version, for example v26.0.
- `--phone-number-id <value>` (value, required). Meta phone number ID.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow key register

Replace the public key used by every dynamic Flow on this Meta phone number. Requires sessions:manage; retain the matching private key on your endpoint.

### Usage

```bash
polymorfa flow key register [flags]
```

### Flags

- `--graph-version <value>` (value, required). Meta Graph version, for example v26.0.
- `--input <value>` (value, required). JSON file containing business_public_key, or - for stdin.
- `--phone-number-id <value>` (value, required). Meta phone number ID.
- `--yes` (boolean, required). Confirm replacing the public key for every Flow on this phone number.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow key rotate

Generate and register a new Polymorfa-managed Flow encryption key for a Number (beta). Every dynamic Flow on the Number uses it; the previous managed key decrypts for 24 hours. Requires sessions:manage. Makes one attempt.

### Usage

```bash
polymorfa flow key rotate [flags]
```

### Flags

- `--session <value>` (value, required). Number name or ID in the project.
- `--yes` (boolean). Confirm replacing the key for every Flow on this Number.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow list

List project Flow drafts. Requires sessions:read.

### Usage

```bash
polymorfa flow list [flags]
```

### Flags

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow publish

Publish a validated Flow to WhatsApp (beta). Requires sessions:manage.

### Usage

```bash
polymorfa flow publish FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--request-id <value>` (value). UUID for this exact provider operation. Reuse to inspect the original receipt.
- `--session <value>` (value, required). Number name or ID in the same project.
- `--yes` (boolean, required). Confirm this Flow change.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow receipts

Read provider operation receipts, including uncertain outcomes. Requires sessions:read.

### Usage

```bash
polymorfa flow receipts FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow sync

Reconcile provider status without replaying uncertain writes (beta). Requires sessions:manage.

### Usage

```bash
polymorfa flow sync FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--request-id <value>` (value). UUID for this exact provider operation. Reuse to inspect the original receipt.
- `--session <value>` (value, required). Number name or ID in the same project.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow update

Update a local project Flow draft. Requires sessions:manage.

### Usage

```bash
polymorfa flow update FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--input <value>` (value, required). JSON file or - for stdin. Project and path identity come from command flags.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa flow upload

Upload the Flow to one Number (beta). Requires sessions:manage. Does not retry uncertain writes.

### Usage

```bash
polymorfa flow upload FLOW [flags]
```

### Arguments

- `FLOW` (required). Flow draft UUID.

### Flags

- `--category <value>` (value, repeatable). WhatsApp Flow category; repeat for multiple categories. Values: `SIGN_UP`, `SIGN_IN`, `APPOINTMENT_BOOKING`, `LEAD_GENERATION`, `CONTACT_US`, `CUSTOMER_SUPPORT`, `SURVEY`, `OTHER`.
- `--request-id <value>` (value). UUID for this exact provider operation. Reuse to inspect the original receipt.
- `--session <value>` (value, required). Number name or ID in the same project.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).
