Phone Routes

Assign Resource to phone route

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 or Import 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.

post/api/fabric/resources/{id}/phone_routes

Path parameters

idstring uuid required

Universal Unique Identifier.

The unique identifier of the Resource.

Request body

phone_route_idstring uuid required

Universal Unique Identifier.

handler'calling' | 'messaging' required

Sets the handler to handle incoming calls or messages.

Response

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

idstring uuid required

Universal Unique Identifier.

namestring required

Name of the Fabric Address.

display_namestring required

Display name of the Fabric Address.

cover_urlstring required

Cover url of the Fabric Address.

preview_urlstring required

Preview url of the Fabric Address.

lockedboolean required

Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls.

created_atstring date-time required

Fabric Address Creation Date.

type'app' required

The display type of a fabric address pointing to an application.

Example response

{
  "name": "justice-league",
  "display_name": "Justice League",
  "cover_url": "https://coverurl.com",
  "preview_url": "https://previewurl.com",
  "locked": true,
  "channels": {
    "audio": "/external/resource_name?channel=audio"
  },
  "created_at": "2024-05-06T12:20:00Z",
  "type": "app"
}

Changes

Changed in 1 of the 161 revisions of this API.11

  • 8befc4893d4511See the full diff
    • ▲

      removed the success response with the status

      response-success-status-removed

    • ○

      added the success response with the status

      response-success-status-added

Of the 161 revisions, 3 have a changelog that could not be searched.