> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# setCallFlow

> Route inbound calls to a Call Flow by ID.

[update]: /docs/server-sdks/reference/typescript/rest/phone-numbers/update

Route inbound calls on this phone number to an existing Call Flow by its ID.

This is a typed wrapper over [`update`][update] that sets `call_handler` to
`call_flow` and populates `call_flow_id` for you.

## **Parameters**

<ParamField path="resourceId" type="string" required={true} toc={true}>
  ID of the phone number to bind.
</ParamField>

<ParamField path="params" type="SetCallFlowParams" required={true} toc={true}>
  Flow ID and options.
</ParamField>

<ParamField path="params.flowId" type="string" required={true} toc={true}>
  ID of the Call Flow to route calls to. Serialized as `call_flow_id`.
</ParamField>

<ParamField path="params.version" type="string" toc={true}>
  Which Call Flow version to invoke. Accepts `"working_copy"` or
  `"current_deployed"`. Defaults to the server's current deployed version when
  omitted. Serialized as `call_flow_version`.
</ParamField>

## **Returns**

`Promise<any>` — The updated phone-number resource.

## **Example**

```typescript {9-12}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

await client.phoneNumbers.setCallFlow("phone-number-id", {
  flowId: "call-flow-id",
  version: "working_copy",
});
```