***

title: sendFax
slug: /reference/typescript/relay/call/send-fax
description: Send a fax document on a call.
max-toc-depth: 3
---------------------

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

[faxaction]: /docs/server-sdks/reference/typescript/relay/actions

[calling-call-fax]: /docs/server-sdks/reference/typescript/relay/call#events

[call-events]: /docs/server-sdks/reference/typescript/relay/call#events

Send a fax document on the call. The document must be accessible via URL.
Returns a [`FaxAction`][faxaction] that you can
use to stop the fax or wait for it to complete.

<Info>
  This method emits [`calling.call.fax`][calling-call-fax] events. See [Call Events][call-events] for payload details.
</Info>

## **Parameters**

<ParamField path="document" type="string" required={true} toc={true}>
  URL of the document to fax (PDF or TIFF format).
</ParamField>

<ParamField path="identity" type="string | undefined" toc={true}>
  Caller identity string (TSI) transmitted with the fax.
</ParamField>

<ParamField path="headerInfo" type="string | undefined" toc={true}>
  Header text printed at the top of each fax page.
</ParamField>

<ParamField path="controlId" type="string | undefined" toc={true}>
  Custom control ID. Auto-generated if not provided.
</ParamField>

<ParamField path="onCompleted" type="(event: RelayEvent) => void | Promise<void>" toc={true}>
  Callback invoked when the fax operation completes.
</ParamField>

## **Returns**

`Promise<`[`FaxAction`][faxaction]`>` -- An action handle with
`stop()` and `wait()` methods.

## **Example**

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

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

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

  const action = await call.sendFax(
    'https://example.com/invoice.pdf',
    { identity: '+15559876543', headerInfo: 'Invoice #12345' }
  );
  const event = await action.wait();

  const faxResult = event.params.fax as Record<string, unknown> ?? {};
  console.log(`Fax sent: ${faxResult.pages ?? 0} pages`);
  await call.hangup();
});

await client.run();
```