---
title: "Validate and publish an immutable inbound call flow version"
description: "Owners and admins only. Existing five step types retain their rules. icf_voice_ai uses config.agentId (UUID or null for the number assignment then workspace default) and requires a wired unavailable exit. Explicit agents must belong to the workspace, be unarchived and set up. Disabled agents produce a warning. Existing graphs perform no additional agent reads."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Voice AI

`POST /api/workspaces/{workspaceId}/inbound-call-flows/{flowId}/publish`

Owners and admins only. Existing five step types retain their rules. icf_voice_ai uses config.agentId (UUID or null for the number assignment then workspace default) and requires a wired unavailable exit. Explicit agents must belong to the workspace, be unarchived and set up. Disabled agents produce a warning. Existing graphs perform no additional agent reads.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `workspaceId` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.path.workspaceId`; string, required)
- `flowId` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.path.flowId`; string, required)
  - format `uuid`

## Request body

_Required._

- `graph` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.graph`; object, required)
  - `nodes` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.graph.nodes`; array<object>, required)
  - `edges` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.graph.edges`; array<object>, required)

## Example request

```json
{
  "graph": {
    "nodes": [
      {}
    ],
    "edges": [
      {}
    ]
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/workspaces/<workspaceId>/inbound-call-flows/<flowId>/publish' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "graph": {
    "nodes": [
      {}
    ],
    "edges": [
      {}
    ]
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/workspaces/<workspaceId>/inbound-call-flows/<flowId>/publish';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({graph: {nodes: [{}], edges: [{}]}})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/workspaces/<workspaceId>/inbound-call-flows/<flowId>/publish"

payload = { "graph": {
        "nodes": [{}],
        "edges": [{}]
    } }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Published version, with optional per-node warnings for disabled agents

#### Example

```json
{
  "success": true,
  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",
  "version": 0,
  "warnings": [
    {
      "nodeId": "string",
      "message": "string"
    }
  ]
}
```

- `success` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.response.200.success`; boolean, optional)
- `versionId` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.response.200.versionId`; string, optional)
  - format `uuid`
- `version` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.response.200.version`; integer, optional)
- `warnings` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.response.200.warnings`; array<object>, optional)
  - `nodeId` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.response.200.warnings.nodeId`; string, optional)
  - `message` (`post/api/workspaces/workspaceId/inbound-call-flows/flowId/publish.response.200.warnings.message`; string, optional)

### 401

Authentication required

### 403

Workspace owner or admin required

### 404

Flow not found in workspace

### 422

Invalid graph or unavailable explicit voice agent; errors include nodeId and message

### 500

Publish failed


Source: https://developer.channelautomations.com/api/post-api-workspaces-workspace-id-inbound-call-flows-flow-id-publish/index.md
