***

title: unreceive
slug: /reference/typescript/relay/client/unreceive
description: Unsubscribe from inbound event contexts.
max-toc-depth: 3
---------------------

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

[receive]: /docs/server-sdks/reference/typescript/relay/client/receive

[on-call]: /docs/server-sdks/reference/typescript/relay/client/on-call

Unsubscribe from contexts for inbound call and message events. Sends a
`signalwire.unreceive` request to stop receiving events on the specified
contexts. This is the inverse of
[`receive()`][receive].

After unsubscribing, inbound calls routed to those contexts will no longer
trigger the [`onCall()`][on-call] handler
on this client.

## **Parameters**

<ParamField path="contexts" type="string[]" required={true} toc={true}>
  List of context names to unsubscribe from. If the list is empty, the method
  returns immediately without sending a request.
</ParamField>

## **Returns**

`Promise<void>`

## **Example**

```typescript {13}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_TOKEN!,
  contexts: ['sales', 'support', 'billing']
});

client.onCall(async (call) => {
  await call.answer();

  // Dynamically unsubscribe from "billing" after the first call
  await client.unreceive(['billing']);
  console.log('Unsubscribed from billing context');

  await call.hangup();
});

await client.run();
```