> This page is for Server SDKs.

> 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.

# receive_fax

> Receive a fax on a call.

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

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

[call-events]: /docs/server-sdks/reference/python/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**

**`control_id`** `str | None` — default: None

Custom control ID. Auto-generated if not provided.

---

**`on_completed`** `Callable[[RelayEvent], Any] | None` — default: None

Callback invoked when the fax reception completes. The event contains
the received document URL and page count.

---

## **Returns**

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

## **Example**

```python {13}
from signalwire.relay import RelayClient

client = RelayClient(
    project="your-project-id",
    token="your-api-token",
    contexts=["default"],
)

@client.on_call
async def handle_call(call):
    await call.answer()

    action = await call.receive_fax()
    event = await action.wait()

    fax_result = event.params.get("fax", {})
    document_url = fax_result.get("document", "")
    pages = fax_result.get("pages", 0)
    print(f"Received fax: {pages} pages, document: {document_url}")
    await call.hangup()

client.run()
```