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

# setCxmlApplication

> Route inbound calls to an existing cXML application by ID.

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

Route inbound calls on this phone number to an existing cXML (LAML) application
by its ID. The server auto-creates a `cxml_application` Fabric resource
referencing the application.

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

## **Parameters**

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

<ParamField path="applicationId" type="string" required={true} toc={true}>
  ID of the cXML application to route calls to.
</ParamField>

<ParamField path="extra" type="Record<string, unknown>" default="{}" toc={true}>
  Additional wire-level fields merged into the PUT body.
</ParamField>

## **Returns**

`Promise<any>` — 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.setCxmlApplication("phone-number-id", "cxml-application-id");
```