# Send fax

> Sends a PDF as a fax from one of your Allo lines. The line must be a US or Canada local number on which fax is turned on in the number settings ("Send and…

`POST /v2/api/faxes`

<Note>
**Required scope:** `FAX_SEND`
</Note>

## Behavior

Sends a PDF as a fax from one of your Allo lines. The request is `multipart/form-data` with three parts: `from`, `to` and `file`.

```bash
curl -X POST https://api.withallo.com/v2/api/faxes \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -F "from=+14155550100" \
  -F "to=+14155551234" \
  -F "file=@contract.pdf;type=application/pdf"
```

The response is `201` with the new conversation item: `type` `SMS`, `message_type` `FAX`, `status` `PENDING`, and the PDF in `attachments`. The fax goes out in the background. `page_count` is `null` in this response and is set once the fax has been sent. Fetch the item later with [Get conversation item](/docs/conversations/get-item) to follow its `status`.

## Requirements

- Fax is enabled on your account.
- `from` is a US or Canada local number you can use, with **Send and receive faxes** turned on in its number settings in the Allo app. Toll-free numbers and sender IDs cannot send faxes.
- `file` is a PDF sent with content type `application/pdf`, of at most 12 MB.
- Your team has enough [credits](/help/billing/credits). Each faxed page uses message credits.

See [Fax overview](/docs/fax/overview) for how faxes appear in conversations.

## Errors

| Status | Code | When |
|--------|------|------|
| `400` | `MISSING_PARAMETER` | `from`, `to` or `file` is missing |
| `400` | `FAX_NOT_SUPPORTED_ON_NUMBER` | The `from` line cannot send faxes |
| `400` | `FAX_NOT_ENABLED_ON_LINE` | **Send and receive faxes** is turned off on the `from` line |
| `400` | `FAX_FILE_NOT_PDF` | `file` is not sent as `application/pdf` |
| `400` | `FAX_FILE_EMPTY` | `file` is empty |
| `400` | `MAX_UPLOAD_SIZE_EXCEEDED` | `file` is larger than 12 MB |
| `402` | `INSUFFICIENT_CREDITS` | Your team does not have enough credits to send the fax |
| `403` | `FAX_NOT_AVAILABLE` | Fax is not enabled on your account. Contact Allo support. |
| `404` | `FROM_NUMBER_NOT_FOUND` | `from` is not a line you can use |

Other errors, such as an invalid `to` number, are the same as for [sending an SMS](/docs/sms/send-sms). See [Error codes](/docs/guides/error-codes).
