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

# setRelayTopic

> Route inbound calls to a Relay topic.

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

Route inbound calls on this phone number to a Relay topic. Relay clients
subscribed to the topic will receive the inbound call event.

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

## **Parameters**

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

ID of the phone number to bind.

---

**`params`** `SetRelayTopicParams` — required

Topic name and options.

---

**`params.topic`** `string` — required

Relay topic name. Serialized as `call_relay_topic`.

---

**`params.statusCallbackUrl`** `string`

URL that receives status updates for calls routed via this topic. Serialized
as `call_relay_topic_status_callback_url`.

---

## **Returns**

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

## **Example**

```typescript {9-12}
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.setRelayTopic("phone-number-id", {
  topic: "office",
  statusCallbackUrl: "https://example.com/status",
});
```