---
title: "Assign Resource to phone route"
method: POST
path: "/api/fabric/resources/{id}/phone_routes"
tags: ["Phone Routes"]
---

# Assign Resource to phone route

`POST /api/fabric/resources/{id}/phone_routes`

Assigns an existing Fabric resource as a phone number's calling or messaging handler. Use it when inbound traffic to an owned number should run an AI Agent, script, Call Flow, Relay Application, or another resource. This operation does not purchase or import the number; use [Purchase phone number](/docs/apis/rest/phone-numbers/purchase-phone-number) or [Import phone number](/docs/apis/rest/phone-numbers/create-imported-phone-number) first when needed.

#### 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).

## Path parameters

- `id` string, uuid, required — Universal Unique Identifier.

## Request body

- PhoneRouteAssignRequest
  - `phone_route_id` string, uuid, required — Universal Unique Identifier.
  - `handler` 'calling' | 'messaging', required — Sets the handler to handle incoming `calls` or `messages`.

## Response `201`

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

- PhoneRouteResponse
  - `id` string, uuid, required — Universal Unique Identifier.
  - `name` string, required — Name of the Fabric Address.
  - `display_name` string, required — Display name of the Fabric Address.
  - `cover_url` string, required — Cover url of the Fabric Address.
  - `preview_url` string, required — Preview url of the Fabric Address.
  - `locked` boolean, required — Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls.
  - `channels` union, required
    - AudioChannel
      - `audio` string, required — Audio Channel of Fabric Address
    - MessagingChannel
      - `messaging` string, required — Messaging Channel of Fabric Address
    - VideoChannel
      - `video` string, required — Video Channel of Fabric Address
  - `created_at` string, date-time, required — Fabric Address Creation Date.
  - `type` 'app', required — The display type of a fabric address pointing to an application.

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

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

- **2026-09-17** `8befc4893d45` — 1 breaking, 1 info
  - removed the success response with the status `200`
  - added the success response with the status `201`

[Change history](https://skmtc.dev/signalwire/apis/signalwire-rest-api/changes/api/fabric/resources/:id/phone_routes/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.dev/signalwire/apis/signalwire-rest-api/revisions/20ee0f568ece?raw)
