> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# 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**

**`resourceId`** `string` — required

ID of the phone number to bind.

---

**`flow_id`** `uuid` — required

ID of the Call Flow to route calls to. Serialized as `call_flow_id`.

---

**`version`** `'working_copy' | 'current_deployed'`

Which Call Flow version to invoke. Defaults to the server's current deployed version when omitted. Serialized as `call_flow_version`.

---

**`extra`** `Record<string, unknown>`

Additional fields merged into the request body.

---

## **Returns**

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

## **Example**

```typescript {9}
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", "call-flow-id", "working_copy");
```