---
title: "Create call flow"
method: POST
path: "/api/fabric/resources/call_flows"
tags: ["Call Flows"]
---

# Create call flow

`POST /api/fabric/resources/call_flows`

Creates a visual Call Flow in your SignalWire project. The new flow becomes a reusable call handler that can be edited in Call Flow Builder and assigned to phone numbers or other routing resources. Use [Create SWML Script](/docs/apis/rest/swml-scripts/create-swml-script) for directly authored SWML, or [Create Relay application](/docs/apis/rest/relay-application/create-relay-application) for a Server SDK handler.

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, _Fax_, or _Video_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space).

## Request body

- CallFlowCreateRequest
  - `title` string, required — The name of the Call Flow
  - `flow_data` object — Call Flow Builder state, stored as an opaque JSON object. Optional but must be paired with `relayml` — provide both fields together or omit both. When both are omitted, SignalWire creates a starter Call Flow.
  - `relayml` object — The calling SWML document this Call Flow should execute. Uses [calling SWML methods](/docs/swml/reference/calling). Optional but must be paired with `flow_data` — provide both fields together or omit both. When both are omitted, SignalWire creates a starter SWML document.

## Response `201`

The request has succeeded and a new resource has been created as a result.

- CallFlowResponse
  - `id` string, uuid, required — Universal Unique Identifier.
  - `project_id` string, uuid, required — Universal Unique Identifier.
  - `display_name` string, required — Display name of the Call Flow Fabric Resource
  - `type` 'call_flow', required — Type of the Fabric Resource
  - `created_at` string, date-time, required — Date and time when the resource was created.
  - `updated_at` string, date-time, required — Date and time when the resource was updated.
  - `call_flow` CallFlow, required
    - `id` string, uuid, required — Universal Unique Identifier.
    - `title` string, required — The name of the Call Flow
    - `flow_data` object — Call Flow Builder state, stored as an opaque JSON object. Produced and consumed by the SignalWire Call Flow Builder UI; not used by SWML execution.
    - `relayml` object — The calling SWML document this Call Flow executes. Uses [calling SWML methods](/docs/swml/reference/calling).
    - `document_version` integer — The current revision of the call flow. Every update must increase this number.

## Other responses

- `401` — Access is unauthorized.
- `404` — The server cannot find the requested resource.
- `422` — The request contains invalid parameters. See errors for details.
- `500` — An internal server error occurred.

## Changes

> 137 revisions in range; 3 could not be searched.

- **2026-08-20** `e79dcc8b2150` — 3 breaking, 1 warning, 2 info
  - the `relayml` request property type/format changed from ``/`` to `object`/``
  - added 'unevaluatedProperties' constraint to the request property `relayml`
  - the `call_flow/allOf[#/components/schemas/CallFlow]/relayml` response's property type/format changed from ``/`` to `object`/`` for status `201`
  - removed `#/components/schemas/SWML.Calling.SWMLObject` from the `relayml` request property `allOf` list
  - …2 more
- **2026-08-18** `51e63ae4cf55` — 182 breaking, 2 warning
  - added the new required request property `relayml/allOf[subschema #1: Calling SWML Document]/sections/main/items/anyOf[subschema #2: ai Method]/ai/allOf[subschema #1: AI Object]/languages/items/code`
  - added the new required request property `relayml/allOf[subschema #1: Calling SWML Document]/sections/main/items/anyOf[subschema #2: ai Method]/ai/allOf[subschema #1: AI Object]/languages/items/name`
  - added the new required request property `relayml/allOf[subschema #1: Calling SWML Document]/sections/main/items/anyOf[subschema #2: ai Method]/ai/allOf[subschema #1: AI Object]/languages/items/voice`
  - added the new required request property `relayml/allOf[subschema #1: Calling SWML Document]/sections/unevaluatedProperties/items/anyOf[subschema #2: ai Method]/ai/allOf[subschema #1: AI Object]/languages/items/code`
  - …180 more
  - …this revision’s changelog is incomplete
- …earlier changes not shown

[Full history](https://skmtc.dev/signalwire/apis/signalwire-rest-api/changes/api/fabric/resources/call_flows/post.md)

---

[API](https://skmtc.dev/signalwire/apis/signalwire-rest-api.md) · [All operations](https://skmtc.dev/signalwire/apis/signalwire-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/signalwire/signalwire-rest-api/revisions/792d5b8e2970/schema)
