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

# assignPhoneRoute

> Assign a phone route to a Fabric resource.

Assign a phone route to a Fabric resource.

<EndpointSchemaSnippet endpoint="POST /api/fabric/resources/{id}/phone_routes" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/fabric/resources/{id}/phone_routes" />

## **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"
});

const result = await client.fabric.resources.assignPhoneRoute("resource-id", {
  phone_route_id: "route-uuid",
  handler: "calling"
});
console.log(`Phone route assigned: ${result.id}`);
```