> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # receiveFax > Receive a fax on a call. [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 Start receiving a fax on the call. Returns a [`FaxAction`][faxaction] that resolves when the fax is fully received or an error occurs. > **Info** > > This method emits [`calling.call.fax`][calling-call-fax] events. See [Call Events][call-events] for payload details. ## **Parameters** **`controlId`** `string | undefined` Custom control ID. Auto-generated if not provided. --- **`onCompleted`** `(event: RelayEvent) => void | Promise` Callback invoked when the fax reception completes. The event contains the received document URL and page count. --- ## **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_API_TOKEN!, contexts: ['default'] }); client.onCall(async (call) => { await call.answer(); const action = await call.receiveFax(); const event = await action.wait(); const faxResult = event.params.fax as Record ?? {}; const documentUrl = (faxResult.document ?? '') as string; const pages = faxResult.pages ?? 0; console.log(`Received fax: ${pages} pages, document: ${documentUrl}`); await call.hangup(); }); await client.run(); ``` > Receive a fax on a call.